aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/config
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-08-09 16:32:30 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-08-09 16:38:09 -0700
commit7ed1dab994fa1c0cf49d10608b8e77271c9804b4 (patch)
treef8f0daec84e0ebc2a2e6e5b5775cc85c43d05364 /ld/testsuite/config
parente8c6b620f70d8cced4a93d8857ad2a57f08a361a (diff)
downloadgdb-7ed1dab994fa1c0cf49d10608b8e77271c9804b4.zip
gdb-7ed1dab994fa1c0cf49d10608b8e77271c9804b4.tar.gz
gdb-7ed1dab994fa1c0cf49d10608b8e77271c9804b4.tar.bz2
LD_CLASS: Check .libs/ld-new for linker first
When --enable-shared is used, ./ld-new may be a shell script and the real linker is .libs/ld-new. We should check .libs/ld-new first. * testsuite/config/default.exp (LD_CLASS): Check .libs/ld-new for linker first.
Diffstat (limited to 'ld/testsuite/config')
-rw-r--r--ld/testsuite/config/default.exp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp
index 355d98f..6aba75f 100644
--- a/ld/testsuite/config/default.exp
+++ b/ld/testsuite/config/default.exp
@@ -253,7 +253,8 @@ if ![info exists LDFLAGS] then {
# Set LD_CLASS to "64bit" for 64-bit LD.
if { ![info exists LD_CLASS] } then {
- set readelf_output [run_host_cmd "$READELF" "-h $LD"]
+ set REAL_LD [findfile $base_dir/.libs/ld-new .libs/ld-new $LD [transform ld]]
+ set readelf_output [run_host_cmd "$READELF" "-h $REAL_LD"]
if { [regexp {[ \t]+Class:[ \t]+ELF64} $readelf_output] } then {
set LD_CLASS "64bit"
} else {