aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-gc
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@mips.com>2018-01-31 14:47:12 +0000
committerMaciej W. Rozycki <macro@mips.com>2018-01-31 14:47:12 +0000
commit8988502d75343349cee39575c0e4a0b33f7c80e0 (patch)
treea5ed05a601c9c3c79dc2e006912beda909693490 /ld/testsuite/ld-gc
parentf3a9baf18db14707276a8c911d4a6409ad965926 (diff)
downloadgdb-8988502d75343349cee39575c0e4a0b33f7c80e0.zip
gdb-8988502d75343349cee39575c0e4a0b33f7c80e0.tar.gz
gdb-8988502d75343349cee39575c0e4a0b33f7c80e0.tar.bz2
MIPS/LD/testsuite: Correct dynamic links with VR4100, VR4300 and VR5000
Correct LD test suite failures with VR4100, VR4300 and VR5000 bare metal MIPS/ELF targets which do not default to linking with shared libraries, which leads to link failures like: .../ld/ld-new: cannot find -lcomm-data FAIL: Common symbol override test or: .../ld/ld-new: attempted static link of dynamic object `tmpdir/pr14170.so' FAIL: PR ld/14170 removing: FAIL: Build pr22471b.so FAIL: Build pr22471 FAIL: Build pr22649-2b.so FAIL: Build pr22649-2d.so FAIL: Build pr22150 FAIL: PR ld/14170 FAIL: --gc-sections with __gxx_personality test failures. ld/ * testsuite/ld-elf/comm-data.exp: Pass `-call_shared' to links involving a shared library for `mips*vr4100*-*-elf*', `mips*vr4300*-*-elf*' and `mips*vr5000*-*-elf*' targets. * testsuite/ld-elf/provide-hidden.exp: Likewise. * testsuite/ld-elf/shared.exp: Likewise. * testsuite/ld-gc/gc.exp: Likewise. * testsuite/ld-mips-elf/comm-data.exp: Likewise.
Diffstat (limited to 'ld/testsuite/ld-gc')
-rw-r--r--ld/testsuite/ld-gc/gc.exp10
1 files changed, 9 insertions, 1 deletions
diff --git a/ld/testsuite/ld-gc/gc.exp b/ld/testsuite/ld-gc/gc.exp
index ad983ef..a95d2d4 100644
--- a/ld/testsuite/ld-gc/gc.exp
+++ b/ld/testsuite/ld-gc/gc.exp
@@ -116,11 +116,18 @@ if { [is_elf_format] && [check_shared_lib_support] } then {
if { [istarget tic6x-*] } then {
set gasopt "-mpic -mpid=near"
}
+ # These targets do not default to linking with shared libraries.
+ set old_ldflags $LDFLAGS
+ if { [istarget "mips*vr4100*-*-elf*"] \
+ || [istarget "mips*vr4300*-*-elf*"] \
+ || [istarget "mips*vr5000*-*-elf*"] } {
+ append LDFLAGS " -call_shared"
+ }
if {![ld_assemble_flags $as $gasopt $srcdir/$subdir/libpersonality.s tmpdir/libpersonality.o]
|| ![ld_link $ld tmpdir/libpersonality.so "-shared tmpdir/libpersonality.o"] } then {
fail libpersonality
} else {
- run_dump_test "personality"
+ run_dump_test "personality" [list [list ld $LFLAGS]]
}
run_dump_test "pr18223"
if {![ld_assemble_flags $as $gasopt $srcdir/$subdir/pr20022a.s tmpdir/pr20022a.o]
@@ -129,6 +136,7 @@ if { [is_elf_format] && [check_shared_lib_support] } then {
} else {
run_dump_test "pr20022"
}
+ set LDFLAGS $old_ldflags
}
if { [is_remote host] || [which $CC] != 0 } {