[binutils-gdb] ld: Pass $NOPIE_CFLAGS and $NOPIE_LDFLAGS to test pr19719

Jens Remus jremus@sourceware.org
Fri Mar 28 14:28:45 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7106a427963462eb5a58e2ece6dc7e4d37132065

commit 7106a427963462eb5a58e2ece6dc7e4d37132065
Author: Jens Remus <jremus@linux.ibm.com>
Date:   Fri Mar 28 15:27:10 2025 +0100

    ld: Pass $NOPIE_CFLAGS and $NOPIE_LDFLAGS to test pr19719
    
    Linker test "pr19719 fun defined" (non PIE) fails on s390x on Fedora 41
    but not on Ubuntu 24.10.  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 hides the test fail.
    
    ld/testsuite/
            PR ld/21090
            * ld-elf/shared.exp: Compile pr19719 (non-PIE) with
            $NOPIE_CFLAGS and link with $NOPIE_LDFLAGS.
    
    Bug: https://sourceware.org/PR21090
    Signed-off-by: Jens Remus <jremus@linux.ibm.com>

Diff:
---
 ld/testsuite/ld-elf/shared.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index 48fdc542e11..fa6357202f0 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -1694,7 +1694,7 @@ proc mix_pic_and_non_pic {xfails cflags ldflags exe} {
     }
 }
 
-mix_pic_and_non_pic [list "arm*-*-*"] "" "" "pr19719"
+mix_pic_and_non_pic [list "arm*-*-*"] "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS" "pr19719"
 mix_pic_and_non_pic [] "-fPIE" "-pie" "pr19719pie"
 
 set AFLAGS_PIE ""


More information about the Binutils-cvs mailing list