# 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.
#
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
}
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