https://sourceware.org/bugzilla/show_bug.cgi?id=21090

--- Comment #36 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jens Remus <jre...@sourceware.org>:

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

commit 58ed43f97879e80392710030161410534ef57016
Author: Jens Remus <jre...@linux.ibm.com>
Date:   Fri Mar 28 15:27:11 2025 +0100

    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 <jre...@linux.ibm.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to