diff options
author | Jiong Wang <jiong.wang@arm.com> | 2017-01-24 09:33:00 +0000 |
---|---|---|
committer | Jiong Wang <jiong.wang@arm.com> | 2017-01-24 09:33:00 +0000 |
commit | 077c11e8679ea7fb4fae977327786fea8353132f (patch) | |
tree | 3e15e32bca0078e6ccbac0035986d5ebe7546eba /ld/testsuite | |
parent | f0158f44168c29338e0b4424c69589f79bf58b19 (diff) | |
download | gdb-077c11e8679ea7fb4fae977327786fea8353132f.zip gdb-077c11e8679ea7fb4fae977327786fea8353132f.tar.gz gdb-077c11e8679ea7fb4fae977327786fea8353132f.tar.bz2 |
[ld, testsuite] Always assemble those intermeidate .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.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ld-plugin/lto.exp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index b525acf..c738895 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -219,20 +219,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"] \ @@ -377,11 +380,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"] \ @@ -392,6 +399,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 |