aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2016-11-02 10:27:23 +0000
committerRainer Orth <ro@gcc.gnu.org>2016-11-02 10:27:23 +0000
commitfdb1aa55d096d306cb04e4e9318c9c1a4bbc71e5 (patch)
tree5c3a30a6938a2426795c49609e53a9ff186dc889
parent4adbcdb4ba25f10c6ad581688ff6cd8bff070655 (diff)
downloadgcc-fdb1aa55d096d306cb04e4e9318c9c1a4bbc71e5.zip
gcc-fdb1aa55d096d306cb04e4e9318c9c1a4bbc71e5.tar.gz
gcc-fdb1aa55d096d306cb04e4e9318c9c1a4bbc71e5.tar.bz2
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: r241783
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/lib/target-supports.exp4
2 files changed, 6 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 38668b7..4b3e9ec 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * lib/target-supports.exp (check_gc_sections_available): Use
+ -print-prog-name=ld to determine linker used.
+
2016-11-02 Martin Liska <mliska@suse.cz>
* gcc.dg/tree-ssa/builtins-folding-gimple-ub.c (main): Add
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 722955a..24a067d 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -462,9 +462,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