]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ld: Pass $NOPIE_CFLAGS and $NOPIE_LDFLAGS to test pr21964-4
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)
Linker test "pr21964-4" fails on s390x on Ubuntu 24.10 but not on
Fedora 41.  The reason is that GCC on Ubuntu is configured with
--enable-default-pie, so that it defaults to compile with -fPIE
and link with -pie, which causes the test to erroneously fail.

ld/testsuite/
PR ld/21090
* ld-elf/shared.exp: Compile pr21964-4 with $NOPIE_CFLAGS and
link with $NOPIE_LDFLAGS.

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

index fa6357202f0dcd784fa26171f5a38cfbe7077a42..09669b5483c04eb5b0333839ab6dd60e8999fb52 100644 (file)
@@ -1618,12 +1618,12 @@ if { [istarget *-*-linux*]
        ] \
        [list \
            "Run pr21964-4" \
-           "" \
+           "$NOPIE_LDFLAGS" \
            "" \
            {pr21964-4.c} \
            "pr21964-4" \
            "pass.out" \
-           "" \
+           "$NOPIE_CFLAGS" \
            "" \
            "" \
            "-ldl" \