Commit fdb1aa55 by Rainer Orth Committed by Rainer Orth

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
parent 4adbcdb4
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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment