* testsuite/ld-plugin/lto.exp (pr12758.exe): Add NOPIE_LDFLAGS.
* testsuite/ld-unique/unique.exp: Add NOPIE_LDFLAGS to unique
executable and dynamic executable tests.
+2020-06-04 Alan Modra <amodra@gmail.com>
+
+ * testsuite/ld-plugin/lto.exp (pr12758.exe): Add NOPIE_LDFLAGS.
+ * testsuite/ld-unique/unique.exp: Add NOPIE_LDFLAGS to unique
+ executable and dynamic executable tests.
+
2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
* testsuite/config/default.exp (NOSANTIZE_CFLAGS): New.
"" "-flto -O2 $lto_fat $NOSANTIZE_CFLAGS" \
{pr12758b.c} {} "libpr12758.a"] \
[list "PR ld/12758" \
- "-O2 -Wl,-e,foo -nostdlib -flto -fuse-linker-plugin tmpdir/pr12758a.o -Wl,--start-group tmpdir/libpr12758.a -Wl,--end-group" \
+ "$NOPIE_LDFLAGS -O2 -Wl,-e,foo -nostdlib -flto -fuse-linker-plugin tmpdir/pr12758a.o -Wl,--start-group tmpdir/libpr12758.a -Wl,--end-group" \
"$NOSANTIZE_CFLAGS" \
{dummy.c} {} "pr12758.exe"] \
[list "Compile PR ld/12760" \
}
# Create executable containing unique symbol.
-if ![ld_link "$CC $board_cflags" "tmpdir/unique_prog" "tmpdir/unique.o"] {
+if ![ld_link "$CC $NOPIE_LDFLAGS $board_cflags" "tmpdir/unique_prog" "tmpdir/unique.o"] {
fail "Could not link a unique executable"
set fails [expr $fails + 1]
}
}
# Create executable NOT containing unique symbol linked against library.
-if {![ld_link "$CC $board_cflags" "tmpdir/unique_shared_prog" "-Ltmpdir tmpdir/unique_empty.o -Wl,-Bdynamic,-rpath=./tmpdir -lunique_shared"] } {
+if {![ld_link "$CC $NOPIE_LDFLAGS $board_cflags" "tmpdir/unique_shared_prog" "-Ltmpdir tmpdir/unique_empty.o -Wl,-Bdynamic,-rpath=./tmpdir -lunique_shared"] } {
fail "Could not link a dynamic executable"
set fails [expr $fails + 1]
}