Reinstate compiler check
authorAlan Modra <amodra@gmail.com>
Mon, 7 Jul 2014 14:12:45 +0000 (23:42 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 7 Jul 2014 14:16:37 +0000 (23:46 +0930)
* lib/ld-lib.exp (check_lto_shared_available): Reinstate compiler
check here too.

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

index 6ab009b036cdd1e3588a5a96999e94f95a9b0da4..1925fed2c3cdde1db0828bf3f999d2d08129343a 100644 (file)
@@ -1,3 +1,8 @@
+2014-07-07  Alan Modra  <amodra@gmail.com>
+
+       * lib/ld-lib.exp (check_lto_shared_available): Reinstate compiler
+       check here too.
+
 2014-07-07  Nick Clifton  <nickc@redhat.com>
 
        * lib/ld-lib.exp (check_lto_available): Check that a compiler is
index 9f7a414cc99f4bbb352bff7888b4990f32e5c22f..9dac6be80144d11f9cccaab3bbdd6ad961d62c9e 100644 (file)
@@ -1700,6 +1700,10 @@ proc check_lto_shared_available { } {
     global CC
 
     if {![info exists lto_shared_available_saved]} {
+        if { [which $CC] == 0 } {
+           set lto_shared_available_saved 0
+           return 0
+       }
        # Check if gcc supports -flto -fuse-linker-plugin -shared
        set flags ""
        if [board_info [target_info name] exists cflags] {