From 33ea299c25134ce23805faa6b2b1e7fe6327f6bb Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Thu, 1 Nov 2018 17:18:24 +0000 Subject: Fix ld action in run_dump_test run_dump_test proposes an ld action but when trying to make use of it in a gas test it gave me some Tcl error. It turns out that it references the check_shared_lib_support procedure and ld_elf_shared_opt variable both only available in ld-lib.exp. I've thus moved the procedure in binutils-common.exp and defined the variable needed in the various default.exp of testsuite that seem to be using run_dump_test. Since check_shared_lib_support itself references the ld variable not defined in binutils-common I've defined it from LD in run_dump_test and fixed LD and LDFLAGS to be defined as expected by run_dump_test in the various default.exp of testsuite using run_dump_test. 2018-11-01 Thomas Preud'homme binutils/ * testsuite/config/default.exp: Define LD, LDFLAGS and ld_elf_shared_opt. * testsuite/lib/binutils-common.exp (check_shared_lib_support): Moved from ld-lib.exp. (run_dump_test): Set ld to $LD. gas/ * testsuite/config/default.exp: Define LD, LDFLAGS and ld_elf_shared_opt. ld/ * testsuite/lib/ld-lib.exp (check_shared_lib_support): Moved to binutils-common.exp. --- ld/testsuite/lib/ld-lib.exp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'ld/testsuite/lib') diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index d6453f19..3fb1e58 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -1069,23 +1069,6 @@ proc check_gc_sections_available { } { return $gc_sections_available_saved } -# Returns true if -shared is supported on the target - -proc check_shared_lib_support { } { - global shared_available_saved - global ld - - if {![info exists shared_available_saved]} { - set ld_output [remote_exec host $ld "-shared"] - if { [ string first "not supported" $ld_output ] >= 0 } { - set shared_available_saved 0 - } else { - set shared_available_saved 1 - } - } - return $shared_available_saved -} - # Return true if target uses genelf.em (assuming it is ELF). proc is_generic_elf { } { if { [istarget "d30v-*-*"] -- cgit v1.1