diff options
author | Alan Modra <amodra@gmail.com> | 2003-06-17 23:26:57 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2003-06-17 23:26:57 +0000 |
commit | 0f84fde19ee862ccc2f5161fedb9a4f773169e47 (patch) | |
tree | 2a1779ec79cb6d448d8c7ceea91113361b6eb4de /ld/testsuite | |
parent | 4ec9a3b2495d5b49da1d83ac4ca0e3f90f8d2f75 (diff) | |
download | gdb-0f84fde19ee862ccc2f5161fedb9a4f773169e47.zip gdb-0f84fde19ee862ccc2f5161fedb9a4f773169e47.tar.gz gdb-0f84fde19ee862ccc2f5161fedb9a4f773169e47.tar.bz2 |
* lib/ld-lib.exp (default_ld_simple_link): Trim ld path before
looking for gcc match.
(default_ld_compile): Likewise for cc.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/lib/ld-lib.exp | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 401c020..413546f 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2003-06-18 Alan Modra <amodra@bigpond.net.au> + + * lib/ld-lib.exp (default_ld_simple_link): Trim ld path before + looking for gcc match. + (default_ld_compile): Likewise for cc. + 2003-06-17 Loren James Rittle <rittle@latour.rsch.comm.mot.com> * ld-undefined/undefined.exp (i?86-*-freebsd*): Remove xfail. diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index 23e4f69..33d449d 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -170,7 +170,8 @@ proc default_ld_simple_link { ld target objects } { # If we are compiling with gcc, we want to add gcc_ld_flag to # flags. Rather than determine this in some complex way, we guess # based on the name of the compiler. - if {[string match "*gcc*" $ld] || [string match "*++*" $ld]} then { + set ldexe [string replace $ld 0 [string last "/" $ld] ""] + if {[string match "*gcc*" $ldexe] || [string match "*++*" $ldexe]} then { set flags "$gcc_ld_flag $flags" } @@ -218,7 +219,8 @@ proc default_ld_compile { cc source object } { # If we are compiling with gcc, we want to add gcc_gas_flag to # flags. Rather than determine this in some complex way, we guess # based on the name of the compiler. - if {[string match "*gcc*" $cc] || [string match "*++*" $cc]} then { + set ccexe [string replace $cc 0 [string last "/" $cc] ""] + if {[string match "*gcc*" $ccexe] || [string match "*++*" $ccexe]} then { set flags "$gcc_gas_flag $flags" } |