diff options
Diffstat (limited to 'ld/testsuite/ld-plugin/lto.exp')
-rw-r--r-- | ld/testsuite/ld-plugin/lto.exp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index 365b988..269dde7 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -180,6 +180,24 @@ set lto_link_elf_tests { {"PR ld/13244" "-shared -O2 -fPIC -flto -fuse-linker-plugin -nostdlib" "-O2 -fno-early-inlining -flto" {pr13244.c} {{"readelf" {-s --wide} "pr13244.d"}} "pr13244.so" "c"} + {"Build libpr15146a.a" + "" "-flto -O2" + {pr15146a.c} {} "lib15146a.a"} + {"Build pr15146b.so" + "-shared" "-O2 -fpic" + {pr15146b.c} {} "pr15146b.so" "c"} + {"Build pr15146c.so" + "-shared 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" "" + {dummy.c} {{"readelf" {-d} "pr15146.d"}} "pr15146a.exe"} + {"Build libpr15146d.a" + "" "-flto -O2" + {pr15146d.c} {} "lib15146d.a"} + {"Build libpr15146d.a" + "" "-flto -O2" + {pr15146d.c} {} "lib15146d.a"} } # Check final symbols in executables. @@ -269,6 +287,13 @@ run_cc_link_tests $lto_link_tests 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"] + if { [ regexp "ltrans.o: undefined reference to symbol 'xxx'" $exec_output ] } { + pass $testname + } { + fail $testname + } } set testname "Build liblto-11.a" |