Silence nds32 pic warnings
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elf / wrap.exp
index ea4e1d1ec586fb0287dedaa3e12209bb6992ba65..639cf615568132e55516510a5abaf1225e051ebf 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for wrap ELF tests.
-#   Copyright (C) 2006-2016 Free Software Foundation, Inc.
+#   Copyright (C) 2006-2018 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -25,8 +25,9 @@ if ![is_elf_format] {
     return
 }
 
-# The following tests require running the executable generated by ld.
-if ![isnative] {
+# Skip targets where -shared is not supported
+
+if ![check_shared_lib_support] {
     return
 }
 
@@ -46,12 +47,12 @@ set build_tests {
 
 set run_tests {
     {"Run with libwrap1a.so and libwrap1b.so"
-     "--wrap par tmpdir/libwrap1a.so tmpdir/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"
-     "--wrap par tmpdir/libwrap1b.so tmpdir/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_ld_link_exec_tests $run_tests
This page took 0.0247 seconds and 4 git commands to generate.