* lib/ld-lib.exp (default_ld_simple_link): Trim ld path before
authorAlan Modra <amodra@gmail.com>
Tue, 17 Jun 2003 23:26:57 +0000 (23:26 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 17 Jun 2003 23:26:57 +0000 (23:26 +0000)
looking for gcc match.
(default_ld_compile): Likewise for cc.

ld/testsuite/ChangeLog
ld/testsuite/lib/ld-lib.exp

index 401c020980cd96fe3f178329c46180f7e9e367fa..413546f4fe28ae6de7a920eef2b30f84a5e00d46 100644 (file)
@@ -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.
index 23e4f698bd9e8ed63aa531ea2d0f82fdbebb93df..33d449d74f935abf458cc067a16d4aca76ff87aa 100644 (file)
@@ -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"
     }
 
This page took 0.026383 seconds and 4 git commands to generate.