aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-02-18 09:13:11 +0000
committerAlan Modra <amodra@gmail.com>2013-02-18 09:13:11 +0000
commit53c3509d86cf36d7277a3974cd55b7e3edb09fa2 (patch)
treeb7ea91b6adaee67755bbf9670b8d049117fc896d /ld
parent3e6f168c5ebce872d1262b889613f26662c554b9 (diff)
downloadgdb-53c3509d86cf36d7277a3974cd55b7e3edb09fa2.zip
gdb-53c3509d86cf36d7277a3974cd55b7e3edb09fa2.tar.gz
gdb-53c3509d86cf36d7277a3974cd55b7e3edb09fa2.tar.bz2
* ld-plugin/lto.exp (Build pr15146b.so) Add -Wl,--no-as-needed.
(PR ld/15146 (1), (2)): Likewise. (LTO 7): Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog6
-rw-r--r--ld/testsuite/ld-plugin/lto.exp8
2 files changed, 10 insertions, 4 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 0e5eda4..660b7cb 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2013-02-18 Alan Modra <amodra@gmail.com>
+
+ * ld-plugin/lto.exp (Build pr15146b.so) Add -Wl,--no-as-needed.
+ (PR ld/15146 (1), (2)): Likewise.
+ (LTO 7): Likewise.
+
2013-02-16 H.J. Lu <hongjiu.lu@intel.com>
PR ld/15146
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index 269dde7..cd4b25e 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -187,10 +187,10 @@ set lto_link_elf_tests {
"-shared" "-O2 -fpic"
{pr15146b.c} {} "pr15146b.so" "c"}
{"Build pr15146c.so"
- "-shared tmpdir/pr15146b.so" "-O2 -fpic"
+ "-shared -Wl,--no-as-needed tmpdir/pr15146b.so" "-O2 -fpic"
{pr15146c.c} {} "pr15146c.so" "c"}
{"PR ld/15146 (1)"
- "-O2 -flto -fuse-linker-plugin -Wl,-rpath-link,. -Wl,--no-copy-dt-needed-entries tmpdir/pr15146a.o tmpdir/pr15146c.so" ""
+ "-O2 -flto -fuse-linker-plugin -Wl,-rpath-link,. -Wl,--no-copy-dt-needed-entries -Wl,--no-as-needed tmpdir/pr15146a.o tmpdir/pr15146c.so" ""
{dummy.c} {{"readelf" {-d} "pr15146.d"}} "pr15146a.exe"}
{"Build libpr15146d.a"
"" "-flto -O2"
@@ -271,7 +271,7 @@ set lto_run_tests {
# LTO run-time tests for ELF
set lto_run_elf_tests {
{"LTO 7"
- "-O2 -flto -fuse-linker-plugin tmpdir/lto-7b.o tmpdir/lto-7c.o tmpdir/lto-7a.o tmpdir/liblto-7.so" ""
+ "-O2 -flto -fuse-linker-plugin tmpdir/lto-7b.o tmpdir/lto-7c.o tmpdir/lto-7a.o -Wl,--no-as-needed tmpdir/liblto-7.so" ""
{dummy.c} "lto-7.exe" "lto-7.out" "" "c"}
{"LTO 8"
"-O2 -flto -fuse-linker-plugin tmpdir/lto-8b.o tmpdir/lto-8a.o" ""
@@ -288,7 +288,7 @@ if { [is_elf_format]
&& [run_host_cmd_yesno $CC "-shared -fPIC $srcdir/$subdir/dummy.c -o tmpdir/t.so"] } {
run_cc_link_tests $lto_link_elf_tests
set testname "PR ld/15146 (2)"
- set exec_output [run_host_cmd "$CC" "$gcc_gas_flag $gcc_ld_flag -O2 -flto -fuse-linker-plugin -Wl,-rpath-link,. -Wl,--no-copy-dt-needed-entries tmpdir/pr15146d.o tmpdir/pr15146c.so"]
+ set exec_output [run_host_cmd "$CC" "$gcc_gas_flag $gcc_ld_flag -O2 -flto -fuse-linker-plugin -Wl,-rpath-link,. -Wl,--no-copy-dt-needed-entries -Wl,--no-as-needed tmpdir/pr15146d.o tmpdir/pr15146c.so"]
if { [ regexp "ltrans.o: undefined reference to symbol 'xxx'" $exec_output ] } {
pass $testname
} {