aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-srec
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-06-21 14:45:16 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-06-21 14:45:57 -0700
commit68193357e8d0fb53a229114713db9f0385f60ed8 (patch)
tree3624e8658b9076a6a834ac7830391ecae7cfccbe /ld/testsuite/ld-srec
parent75312ae3ab577c3a72ada54512533fec8bfae7bb (diff)
downloadgdb-68193357e8d0fb53a229114713db9f0385f60ed8.zip
gdb-68193357e8d0fb53a229114713db9f0385f60ed8.tar.gz
gdb-68193357e8d0fb53a229114713db9f0385f60ed8.tar.bz2
Pass $NOPIE_LDFLAGS size tests
PR ld/21090 * testsuite/ld-size/size.exp: Pass $NOPIE_LDFLAGS to size-4a, size-4b, size-5a, size-5b, size-6 and size-8 tests.
Diffstat (limited to 'ld/testsuite/ld-srec')
-rw-r--r--ld/testsuite/ld-srec/srec.exp9
1 files changed, 5 insertions, 4 deletions
diff --git a/ld/testsuite/ld-srec/srec.exp b/ld/testsuite/ld-srec/srec.exp
index 2720043..cb0b69b 100644
--- a/ld/testsuite/ld-srec/srec.exp
+++ b/ld/testsuite/ld-srec/srec.exp
@@ -351,12 +351,13 @@ if { ![is_remote host] && [which $CC] == 0 } {
}
# Pass -fplt to CC and CXX since -fno-plt doesn't work with S-records
-# tests.
-global PLT_CFLAGS
+# tests. Also add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if PIE doesn't work
+# with S-records.
+global PLT_CFLAGS NOPIE_CFLAGS NOPIE_LDFLAGS
set old_CC "$CC"
-set CC "$CC $PLT_CFLAGS"
+set CC "$CC $PLT_CFLAGS $NOPIE_CFLAGS $NOPIE_LDFLAGS"
set old_CXX "$CXX"
-set CXX "$CXX $PLT_CFLAGS"
+set CXX "$CXX $PLT_CFLAGS $NOPIE_CFLAGS $NOPIE_LDFLAGS"
if { ![ld_compile $CC $srcdir/$subdir/sr1.c tmpdir/sr1.o] \
|| ![ld_compile $CC $srcdir/$subdir/sr2.c tmpdir/sr2.o] } {