From: Nick Clifton Date: Mon, 7 Jul 2014 13:41:10 +0000 (+0100) Subject: This patch prevents a linker testsuite error if the checks are run with a X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=19aef622f37ae4f940d6e3ef6835fd5519289178;p=binutils-gdb.git This patch prevents a linker testsuite error if the checks are run with a toolchain that just contains the binutils - ie without a compiler. * lib/ld-lib.exp (check_lto_available): Check that a compiler is available before testing for LTO support. --- diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 8877311b176..6ab009b036c 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-07-07 Nick Clifton + + * lib/ld-lib.exp (check_lto_available): Check that a compiler is + available before testing for LTO support. + 2014-07-07 Alan Modra * config/default.exp: Don't make tmpdir/gas. Put as symlink into diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index a657a975ebc..9f7a414cc99 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] {