This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Commit: Fix check_lto_available proc


Hi Guys,

  I am checking in the patch below to fix the check_lto_available proc
  in the linker testsuite library, so that it will test for the presence
  of a compiler first.  Before this patch it was just assuming that a
  compiler was available and that it could check it for LTO support.

Cheers
  Nick

ld/testsuite/ChangeLog
2014-07-07  Nick Clifton  <nickc@redhat.com>

	* lib/ld-lib.exp (check_lto_available): Check that a compiler is
	available before testing for LTO support.

diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index a657a97..9f7a414 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -1666,6 +1666,10 @@ proc check_lto_available { } {
     global CC
 
     if {![info exists lto_available_saved]} {
+        if { [which $CC] == 0 } {
+	    set lto_available_saved 0
+	    return 0
+	}
 	# Check if gcc supports -flto -fuse-linker-plugin
 	set flags ""
 	if [board_info [target_info name] exists cflags] {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]