diff options
author | Nick Clifton <nickc@redhat.com> | 2014-07-07 14:41:10 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2014-07-07 14:41:10 +0100 |
commit | 19aef622f37ae4f940d6e3ef6835fd5519289178 (patch) | |
tree | 8415f3af294ee419206cc0c8ecddf4a8c82f2d79 /ld/testsuite/lib | |
parent | f1d7f4a64c4d92911127abe6dbab95a219405c2b (diff) | |
download | gdb-19aef622f37ae4f940d6e3ef6835fd5519289178.zip gdb-19aef622f37ae4f940d6e3ef6835fd5519289178.tar.gz gdb-19aef622f37ae4f940d6e3ef6835fd5519289178.tar.bz2 |
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.
Diffstat (limited to 'ld/testsuite/lib')
-rw-r--r-- | ld/testsuite/lib/ld-lib.exp | 4 |
1 files changed, 4 insertions, 0 deletions
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] { |