diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-07-27 05:17:26 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-07-27 05:17:26 -0700 |
commit | cda77e9efc68d04e50990ea72890bd8e515d4d7b (patch) | |
tree | 82ca77e34c95354934fe171871f7317a6e344ac6 /ld | |
parent | 379d3f1ffc3fab112a0f388a1565c6be2f74f5c3 (diff) | |
download | binutils-cda77e9efc68d04e50990ea72890bd8e515d4d7b.zip binutils-cda77e9efc68d04e50990ea72890bd8e515d4d7b.tar.gz binutils-cda77e9efc68d04e50990ea72890bd8e515d4d7b.tar.bz2 |
Pass $PLT_CFLAGS to ld_compile
Some linker shard library tests without PIC expect PLT. This patch
passes $PLT_CFLAGS to ld_compile.
* ld-shared/shared.exp: Pass $PLT_CFLAGS to ld_compile.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-shared/shared.exp | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 9e785a8..abc49b3 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2015-07-27 H.J. Lu <hongjiu.lu@intel.com> + * ld-shared/shared.exp: Pass $PLT_CFLAGS to ld_compile. + +2015-07-27 H.J. Lu <hongjiu.lu@intel.com> + * ld-scripts/crossref.exp (CC): Save and restore. Append $PLT_CFLAGS. diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp index 7f418dc..2be4f6a 100644 --- a/ld/testsuite/ld-shared/shared.exp +++ b/ld/testsuite/ld-shared/shared.exp @@ -217,9 +217,10 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] # although it will be less efficient because the dynamic linker # will need to do more relocation work. However, note that not # using -fpic will cause some of the tests to return different - # results. - if { ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/sh1.c $tmpdir/sh1np.o] - || ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/sh2.c $tmpdir/sh2np.o] } { + # 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] + || ![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*] } { shared_test shnp "shared (nonPIC)" mainnp.o sh1np.o sh2np.o xcoff |