aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-06-22 12:53:39 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-06-22 12:53:39 -0700
commit922109c7182858b005f55f6ac69bb6af145fc710 (patch)
treed9a9811d24cc6e0be57d0db8bf071fbc909a19ff /ld
parent84da4cf89efed1df483914d06210daae79ce3eb8 (diff)
downloadgdb-922109c7182858b005f55f6ac69bb6af145fc710.zip
gdb-922109c7182858b005f55f6ac69bb6af145fc710.tar.gz
gdb-922109c7182858b005f55f6ac69bb6af145fc710.tar.bz2
Pass $NOPIE_CFLAGS to ELF visibility tests
PR ld/21090 * testsuite/ld-elfvsb/elfvsb.exp (visibility_run): Pass $NOPIE_CFLAGS if non-PIE is required.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/testsuite/ld-elfvsb/elfvsb.exp5
2 files changed, 9 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index a8ca46b..2dfc0a4 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,6 +1,12 @@
2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
PR ld/21090
+ * testsuite/ld-elfvsb/elfvsb.exp (visibility_run): Pass
+ $NOPIE_CFLAGS if non-PIE is required.
+
+2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/21090
* testsuite/ld-i386/i386.exp: Pass $NOPIE_CFLAGS and
$NOPIE_LDFLAGS to "Run pr19031".
diff --git a/ld/testsuite/ld-elfvsb/elfvsb.exp b/ld/testsuite/ld-elfvsb/elfvsb.exp
index a2c3ef7..7552f7a 100644
--- a/ld/testsuite/ld-elfvsb/elfvsb.exp
+++ b/ld/testsuite/ld-elfvsb/elfvsb.exp
@@ -236,6 +236,7 @@ proc visibility_run {visibility} {
global support_protected
global shared_needs_pic
global PLT_CFLAGS
+ global NOPIE_CFLAGS
global COMPRESS_LDFLAG
if [ string match $visibility "hidden" ] {
@@ -285,8 +286,8 @@ proc visibility_run {visibility} {
# will need to do more relocation work. However, note that not
# using -fpic will cause some of the tests to return different
# results. Make sure that PLT is used since PLT is expected.
- if { ![ld_compile "$CC -g $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG" $srcdir/$subdir/sh1.c $tmpdir/sh1np.o]
- || ![ld_compile "$CC -g $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG" $srcdir/$subdir/sh2.c $tmpdir/sh2np.o] } {
+ if { ![ld_compile "$CC -g $NOPIE_CFLAGS $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG" $srcdir/$subdir/sh1.c $tmpdir/sh1np.o]
+ || ![ld_compile "$CC -g $NOPIE_CFLAGS $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG" $srcdir/$subdir/sh2.c $tmpdir/sh2np.o] } {
unresolved "visibility ($visibility) (non PIC)"
} else { if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
visibility_test $visibility vnp "visibility ($visibility) (non PIC)" mainnp.o sh1np.o sh2np.o xcoff