diff options
author | Jiong Wang <jiong.wang@arm.com> | 2017-01-24 09:33:00 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-09-27 19:09:07 +0930 |
commit | fdb1e6a81b0bd363908139e40d520801cb89e4e0 (patch) | |
tree | b348b80e4de3991aeb6f6eb5b2c8062a85e96bf4 | |
parent | 5f3af8cbbc70b4859b7559b35324236a4658f2c8 (diff) | |
download | gdb-fdb1e6a81b0bd363908139e40d520801cb89e4e0.zip gdb-fdb1e6a81b0bd363908139e40d520801cb89e4e0.tar.gz gdb-fdb1e6a81b0bd363908139e40d520801cb89e4e0.tar.bz2 |
[ld, testsuite] Always assemble those intermediate .o files used later
ld/
* testsuite/ld-plugin/lto.exp (lto_link_elf_tests): Move "Compile 7",
"Compile 8a", "Compile 8b"...
(lto_compile_elf_tests): ...to here. Always run these tests.
(lto_run_elf_tests): Move "LTO 7"...
(lto_run_elf_shared_tests): ...to here. Restrict these tests on
environment where share library is supported.
(cherry picked from commit 077c11e8679ea7fb4fae977327786fea8353132f)
-rw-r--r-- | ld/ChangeLog | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/lto.exp | 29 |
2 files changed, 33 insertions, 7 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 0b9865d..7593a08 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,14 @@ +2017-09-27 Alan Modra <amodra@gmail.com> + + Apply from master + 2017-01-24 Jiong Wang <jiong.wang@arm.com> + * testsuite/ld-plugin/lto.exp (lto_link_elf_tests): Move "Compile 7", + "Compile 8a", "Compile 8b"... + (lto_compile_elf_tests): ...to here. Always run these tests. + (lto_run_elf_tests): Move "LTO 7"... + (lto_run_elf_shared_tests): ...to here. Restrict these tests on + environment where share library is supported. + 2017-08-30 Maciej W. Rozycki <macro@imgtec.com> * testsuite/ld-mips-elf/bal-jalx-addend-micromips.d: New test. diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index d1ef17e..49285b4 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -214,20 +214,23 @@ if { [at_least_gcc_version 4 7] } { ]] } -# Generate input files for complex LTO tests for ELF. -set lto_link_elf_tests [list \ +set lto_compile_elf_tests [list \ [list "Compile 7" \ "" "-flto -O2" \ {lto-7a.c lto-7b.c lto-7c.c} {} ""] \ - [list "Build liblto-7.so" \ - "-shared" "-O2 -fpic" \ - {lto-7d.c} {} "liblto-7.so" "c"] \ [list "Compile 8a" \ "" "-O2" \ {lto-8a.c} {} ""] \ [list "Compile 8b" \ "" "-flto -O2" \ {lto-8b.c} {} ""] \ +] + +# Generate input files for complex LTO tests for ELF. +set lto_link_elf_tests [list \ + [list "Build liblto-7.so" \ + "-shared" "-O2 -fpic" \ + {lto-7d.c} {} "liblto-7.so" "c"] \ [list "Build liblto-17a.so" \ "-shared -O2 -fpic -flto -fuse-linker-plugin" "-O2 -fpic -flto" \ {lto-17a.c} {{"nm" {} "lto-17a.d"}} "liblto-17a.so" "c"] \ @@ -372,11 +375,15 @@ if { [at_least_gcc_version 4 7] } { ]] } -# LTO run-time tests for ELF -set lto_run_elf_tests [list \ +# LTO run-time tests for ELF which require shared library support. +set lto_run_elf_shared_tests [list \ [list "LTO 7" \ "-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 run-time tests for ELF +set lto_run_elf_tests [list \ [list "LTO 8" \ "-O2 -flto -fuse-linker-plugin tmpdir/lto-8b.o tmpdir/lto-8a.o" "" \ {dummy.c} "lto-8.exe" "lto-8.out" "" "c"] \ @@ -387,6 +394,10 @@ set lto_run_elf_tests [list \ run_cc_link_tests $lto_link_tests +# These compilation tests generate intermediate object files which will be used +# by some elf tests besides shared libs tests. So, always compile them. +run_cc_link_tests $lto_compile_elf_tests + # Restrict these to ELF targets that support shared libs and PIC. if { [is_elf_format] && [check_lto_shared_available] } { run_cc_link_tests $lto_link_elf_tests @@ -487,6 +498,10 @@ if { [is_elf_format] } { run_ld_link_exec_tests $lto_run_elf_tests } +if { [is_elf_format] && [check_lto_shared_available] } { + run_ld_link_exec_tests $lto_run_elf_shared_tests +} + proc pr20103 {cflags libs} { global CC |