]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
x86: Pass $NOPIE_LDFLAGS to undefined weak tests
authorJens Remus <jremus@linux.ibm.com>
Fri, 28 Mar 2025 14:27:11 +0000 (15:27 +0100)
committerJens Remus <jremus@linux.ibm.com>
Fri, 28 Mar 2025 14:27:11 +0000 (15:27 +0100)
commit41f0b410f5dc59ae89b7ec87bc3601d38b2030c8
tree1327ce4f0bb9c35ec9183d639923a6e6503d6a9c
parent63621cffc5ca44ef9d830f6e562dda5ccbffbeca
x86: Pass $NOPIE_LDFLAGS to undefined weak 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 some of the tests.  Therefore link the PDE test programs with
$NOPIE_LDFLAGS to disable PIE.

This complements commit a7eaf017f959 ("Use NOPIE_CFLAGS and
NOPIE_LDFLAGS to disable PIE").

ld/testsuite/
PR ld/21090
* ld-x86-64/x86-64.exp (undefined_weak): Use NOPIE_LDFLAGS to
disable PIE for the non-PIE versions of the test.

Bug: https://sourceware.org/PR21090
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
ld/testsuite/ld-x86-64/x86-64.exp