aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-06-21 14:57:53 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-06-21 14:57:53 -0700
commite5c89b096d9cb9e5956e98cd5863519c87c6890b (patch)
tree348aa6ea2d9bf602549764e24e09fdd105c9c809
parent127d08c03f8bdb515389359ab605b6ee548996fd (diff)
downloadgdb-e5c89b096d9cb9e5956e98cd5863519c87c6890b.zip
gdb-e5c89b096d9cb9e5956e98cd5863519c87c6890b.tar.gz
gdb-e5c89b096d9cb9e5956e98cd5863519c87c6890b.tar.bz2
Pass $NOPIE_CFLAGS to NOCROSSREFS tests
PR ld/21090 * testsuite/ld-scripts/crossref.exp: Also pass $NOPIE_CFLAGS to CC.
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/testsuite/ld-scripts/crossref.exp5
2 files changed, 9 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 6aaa49c..555b7b4 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,6 +1,12 @@
2017-06-21 H.J. Lu <hongjiu.lu@intel.com>
PR ld/21090
+ * testsuite/ld-scripts/crossref.exp: Also pass $NOPIE_CFLAGS
+ to CC.
+
+2017-06-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ 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.
* testsuite/ld-srec/srec.exp (NOPIE_CFLAGS): New.
diff --git a/ld/testsuite/ld-scripts/crossref.exp b/ld/testsuite/ld-scripts/crossref.exp
index 4318e15..8ac0264 100644
--- a/ld/testsuite/ld-scripts/crossref.exp
+++ b/ld/testsuite/ld-scripts/crossref.exp
@@ -42,9 +42,10 @@ global CFLAGS
set old_CFLAGS "$CFLAGS"
# Pass -fplt to CC since -fno-plt doesn't work with NOCROSSREFS tests.
-global PLT_CFLAGS
+# Also add $NOPIE_CFLAGS since PIE doesn't work NOCROSSREFS tests.
+global PLT_CFLAGS NOPIE_CFLAGS
set old_CC "$CC"
-set CC "$CC $PLT_CFLAGS"
+set CC "$CC $PLT_CFLAGS $NOPIE_CFLAGS"
# Xtensa targets currently default to putting literal values in a separate
# section and that requires linker script support, so put literals in text.