From 9d1c54ed7f3a4a70f35f85658c311697c17a95f5 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 22 Jun 2017 09:53:33 -0700 Subject: Pass $NOPIE_CFLAGS and $NOPIE_LDFLAGS to more ELF tests PR ld/21090 * testsuite/ld-gc/gc.ex: Compile tmpdir/pr14265.o with $NOPIE_CFLAGS. * testsuite/ld-i386/i386.exp: Pass $NOPIE_CFLAGS and $NOPIE_LDFLAGS if non-PIE is required. * testsuite/ld-i386/no-plt.exp (NOPIE_CFLAGS): New. (NOPIE_LDFLAGS): Likewise. Pass $NOPIE_LDFLAGS if non-PIE is required. * testsuite/ld-shared/shared.exp: Compile tmpdir/sh1np.o with $NOPIE_CFLAGS. --- ld/testsuite/ld-shared/shared.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ld/testsuite/ld-shared/shared.exp') diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp index 93181dc..723b51c 100644 --- a/ld/testsuite/ld-shared/shared.exp +++ b/ld/testsuite/ld-shared/shared.exp @@ -225,8 +225,8 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] # 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. - global PLT_CFLAGS - if { ![ld_compile "$CC $PLT_CFLAGS $CFLAGS $SHCFLAG" $srcdir/$subdir/sh1.c $tmpdir/sh1np.o] + global PLT_CFLAGS NOPIE_CFLAGS + if { ![ld_compile "$CC $PLT_CFLAGS $NOPIE_CFLAGS $CFLAGS $SHCFLAG" $srcdir/$subdir/sh1.c $tmpdir/sh1np.o] || ![ld_compile "$CC $PLT_CFLAGS $CFLAGS $SHCFLAG" $srcdir/$subdir/sh2.c $tmpdir/sh2np.o] } { unresolved "shared (non PIC)" } else { if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } { -- cgit v1.1