* lib/ld.exp (default_ld_compile): If cc argument is multiple words, use only
authorKen Raeburn <raeburn@cygnus>
Tue, 23 May 1995 00:20:44 +0000 (00:20 +0000)
committerKen Raeburn <raeburn@cygnus>
Tue, 23 May 1995 00:20:44 +0000 (00:20 +0000)
the first when trying to verify the availability of the compiler.

ld/testsuite/lib/ld.exp

index 1a63b68b98620663adb3c77fa0cd9e786910cac3..0121c0d542bed8336b49e97af5712c8630bc1878 100644 (file)
@@ -106,9 +106,13 @@ proc default_ld_compile { cc source object } {
     global CFLAGS
     global srcdir
     global subdir
-    
-    if {[which $cc] == 0} then {
-       perror "$cc does not exist"
+
+    set cc_prog $cc
+    if {[llength $cc_prog] > 1} then {
+       set cc_prog [lindex $cc_prog 0]
+    }
+    if {[which $cc_prog] == 0} then {
+       perror "$cc_prog does not exist"
        return 0
     }