Avoid testsuite errors about missing compilers.
authorNick Clifton <nickc@redhat.com>
Thu, 11 Aug 2016 09:22:41 +0000 (10:22 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 11 Aug 2016 09:22:41 +0000 (10:22 +0100)
PR ld/20436
* testsuite/lib/ld-lib.exp (check_gcc_plugin_enabled): When not
testing remotely, check to see if target compiler is installed
before trying to run it.

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

index f6b994ed21fd0334b7eabb0ffed71e39d325e159..6e9565c393da45930078b9bd0281462d57d960aa 100644 (file)
@@ -1,3 +1,10 @@
+2016-08-11  Nick Clifton  <nickc@redhat.com>
+
+       PR ld/20436
+       * testsuite/lib/ld-lib.exp (check_gcc_plugin_enabled): When not
+       testing remotely, check to see if target compiler is installed
+       before trying to run it.
+
 2016-08-10  Maciej W. Rozycki  <macro@imgtec.com>
 
        PR ld/15428
index b3cdb70a388e70c1f4f1c3c51a31cec1ec149163..23055bef337b57051701a311c4e2e2acdd38ab4f 100644 (file)
@@ -1815,7 +1815,10 @@ proc check_gcc_plugin_enabled { } {
     if {![info exists CC]} {
        set CC [find_gcc]
     }
-    if { $CC == "" } {
+    if { $CC == ""} {
+      return 0
+    }
+    if { ![is_remote host] && [which $CC] == 0 } then {
       return 0
     }
     set state [remote_exec host $CC -v]