From: Ken Raeburn Date: Tue, 23 May 1995 00:20:44 +0000 (+0000) Subject: * lib/ld.exp (default_ld_compile): If cc argument is multiple words, use only X-Git-Tag: gdb-4_18~11745 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a98ecf24e6933c7b1da49b47d664694d324c308;p=external%2Fbinutils.git * lib/ld.exp (default_ld_compile): If cc argument is multiple words, use only the first when trying to verify the availability of the compiler. --- diff --git a/ld/testsuite/lib/ld.exp b/ld/testsuite/lib/ld.exp index 1a63b68..0121c0d 100644 --- a/ld/testsuite/lib/ld.exp +++ b/ld/testsuite/lib/ld.exp @@ -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 }