From: Rainer Orth Date: Wed, 2 Nov 2016 10:35:57 +0000 (+0000) Subject: Fix linker detection in check_gc_sections_available X-Git-Tag: releases/gcc-5.5.0~727 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a4de19c8d64f782b0a3efae76b0cbcdb86905f5;p=thirdparty%2Fgcc.git Fix linker detection in check_gc_sections_available * lib/target-supports.exp (check_gc_sections_available): Use -print-prog-name=ld to determine linker used. From-SVN: r241785 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e34697c2ad4f..a85f04aebc38 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-11-02 Rainer Orth + + * lib/target-supports.exp (check_gc_sections_available): Use + -print-prog-name=ld to determine linker used. + 2016-10-31 Thomas Koenig Backport from trunk diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index b7aca17330b5..d5dfeaee7912 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -427,9 +427,7 @@ proc check_gc_sections_available { } { } # Check if the ld used by gcc supports --gc-sections. - set gcc_spec [${tool}_target_compile "-dumpspecs" "" "none" ""] - regsub ".*\n\\*linker:\[ \t\]*\n(\[^ \t\n\]*).*" "$gcc_spec" {\1} linker - set gcc_ld [lindex [${tool}_target_compile "-print-prog-name=$linker" "" "none" ""] 0] + set gcc_ld [lindex [${tool}_target_compile "-print-prog-name=ld" "" "none" ""] 0] set ld_output [remote_exec host "$gcc_ld" "--help"] if { [ string first "--gc-sections" $ld_output ] >= 0 } { set gc_sections_available_saved 1