diff options
author | Jens Remus <jremus@linux.ibm.com> | 2025-03-28 15:27:11 +0100 |
---|---|---|
committer | Jens Remus <jremus@linux.ibm.com> | 2025-03-28 15:27:11 +0100 |
commit | 58ed43f97879e80392710030161410534ef57016 (patch) | |
tree | db9a8e8c7ab6bffbd8fb6f138df24e9ec528940d /gdb/cli/cli-script.c | |
parent | 07468ded302ecaec1114f2d5c4d94e05c631f2ac (diff) | |
download | binutils-58ed43f97879e80392710030161410534ef57016.zip binutils-58ed43f97879e80392710030161410534ef57016.tar.gz binutils-58ed43f97879e80392710030161410534ef57016.tar.bz2 |
ld: Pass $NOPIE_CFLAGS and $NOPIE_LDFLAGS to even more ELF shared tests
Some distributions configure GCC with --enable-default-pie, so that it
defaults to compile with -fPIE and link with -pie, which is unexpected
by the test. Therefore compile the non-PIC sources with $NOPIE_CFLAGS
and link the test programs with $NOPIE_LDFLAGS.
Commit 9d1c54ed7f3a ("Pass $NOPIE_CFLAGS and $NOPIE_LDFLAGS to more ELF
tests") added $NOPIE_CFLAGS when compiling sh1np.o. It missed to add it
to sh2np.o and mainnp.o.
ld/testsuite/
PR ld/21090
* ld-shared/shared.exp (shared_test): Add support for optional
ldflags argument and use it when linking the test program.
(sh2np.o, mainnp.o): Compile with $NOPIE_CFLAGS.
(shnp, shp, shmpnp, shmpp): Link with $NOPIE_LDFLAGS.
Fixes: 9d1c54ed7f3a ("Pass $NOPIE_CFLAGS and $NOPIE_LDFLAGS to more ELF tests")
Bug: https://sourceware.org/PR21090
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
Diffstat (limited to 'gdb/cli/cli-script.c')
0 files changed, 0 insertions, 0 deletions