diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-05-08 06:22:19 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-05-08 07:00:49 -0700 |
commit | 1dfd6a2f93a0267a4a358b51ad4ed42feba3d920 (patch) | |
tree | 2f91609b601a8febb61422073a33f7ee3c557556 /ld/testsuite | |
parent | 43bb6c0e087b6fd46c0b347d2b5678acb5c68c85 (diff) | |
download | gdb-1dfd6a2f93a0267a4a358b51ad4ed42feba3d920.zip gdb-1dfd6a2f93a0267a4a358b51ad4ed42feba3d920.tar.gz gdb-1dfd6a2f93a0267a4a358b51ad4ed42feba3d920.tar.bz2 |
ld: Run --wrap tests only if supported
Run --wrap tests with shared library only if -shared is supported.
* testsuite/ld-elf/wrap.exp: Run --wrap tests with shared library
only if -shared is supported.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ld-elf/wrap.exp | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/ld/testsuite/ld-elf/wrap.exp b/ld/testsuite/ld-elf/wrap.exp index d24c1e7..90e2d60 100644 --- a/ld/testsuite/ld-elf/wrap.exp +++ b/ld/testsuite/ld-elf/wrap.exp @@ -25,34 +25,30 @@ if ![is_elf_format] { return } -# Skip targets where -shared is not supported - -if ![check_shared_lib_support] { - return -} - # Check if compiler works if { ![check_compiler_available] } { return } -set build_tests { - {"Build libwrap1a.so" - "-shared" "-fPIC" - {wrap1a.c} {} "libwrap1a.so"} - {"Build libwrap1b.so" - "-shared tmpdir/libwrap1a.so" "-fPIC" - {wrap1b.c} {} "libwrap1b.so"} -} - -set run_tests { +if [check_shared_lib_support] { + set build_tests { + {"Build libwrap1a.so" + "-shared" "-fPIC" + {wrap1a.c} {} "libwrap1a.so"} + {"Build libwrap1b.so" + "-shared tmpdir/libwrap1a.so" "-fPIC" + {wrap1b.c} {} "libwrap1b.so"} + } + + set run_tests { {"Run with libwrap1a.so and libwrap1b.so" "-Wl,--no-as-needed,--wrap,par tmpdir/libwrap1a.so tmpdir/libwrap1b.so" "" {wrap1.c} "wrap1" "wrap1.out"} {"Run with libwrap1b.so and libwrap1a.so" "-Wl,--no-as-needed,--wrap,par tmpdir/libwrap1b.so tmpdir/libwrap1a.so" "" {wrap1.c} "wrap1" "wrap1.out"} -} + } -run_cc_link_tests $build_tests -run_ld_link_exec_tests $run_tests + run_cc_link_tests $build_tests + run_ld_link_exec_tests $run_tests +} |