From e5c89b096d9cb9e5956e98cd5863519c87c6890b Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 21 Jun 2017 14:57:53 -0700 Subject: [PATCH] Pass $NOPIE_CFLAGS to NOCROSSREFS tests PR ld/21090 * testsuite/ld-scripts/crossref.exp: Also pass $NOPIE_CFLAGS to CC. --- ld/ChangeLog | 6 ++++++ ld/testsuite/ld-scripts/crossref.exp | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 6aaa49c6b95..555b7b4e15d 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2017-06-21 H.J. Lu + + PR ld/21090 + * testsuite/ld-scripts/crossref.exp: Also pass $NOPIE_CFLAGS + to CC. + 2017-06-21 H.J. Lu PR ld/21090 diff --git a/ld/testsuite/ld-scripts/crossref.exp b/ld/testsuite/ld-scripts/crossref.exp index 4318e15c8be..8ac02645765 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. -- 2.30.2