[Bug target/55522] -funsafe-math-optimizations is unexpectedly harmful, especially w/ -shared

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jan 23 12:34:48 GMT 2023


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522

--- Comment #39 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:054e407b7f68f714c024d8a9c983fdd53ceead2b

commit r13-5305-g054e407b7f68f714c024d8a9c983fdd53ceead2b
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Jan 13 08:54:33 2023 +0100

    sparc: Don't add crtfastmath.o for -shared

    Don't add crtfastmath.o for -shared to avoid altering the FP
    environment when loading a shared library.

            PR target/55522
            * config/sparc/freebsd.h (ENDFILE_SPEC): Don't add crtfastmath.o
            for -shared.
            * config/sparc/linux.h (ENDFILE_SPEC): Likewise.
            * config/sparc/linux64.h (ENDFILE_SPEC): Likewise.
            * config/sparc/sp-elf.h (ENDFILE_SPEC): Likewise.
            * config/sparc/sp64-elf.h (ENDFILE_SPEC): Likewise.


More information about the Gcc-bugs mailing list