Don't add crtfastmath.o for -shared.
authorliuhongt <hongtao.liu@intel.com>
Fri, 13 Jan 2023 08:19:47 +0000 (16:19 +0800)
committerliuhongt <hongtao.liu@intel.com>
Wed, 18 Jan 2023 02:46:17 +0000 (10:46 +0800)
commit159b0f41adc4c8ead45e12a523470381ce716ff2
tree4a3cc5f7685c1f96f3b488d057cb78369cac73b5
parent04d7cc165387d19e1433a4b2157d2bde7b95305b
Don't add crtfastmath.o for -shared.

Patches [1] and [2] fixed PR55522 for x86-linux but left all other x86
targets unfixed (x86-cygwin, x86-darwin and x86-mingw32).
This patch applies a similar change to other specs using crtfastmath.o.

[1] https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608528.html
[2] https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608529.html

gcc/ChangeLog:

PR target/55522
* config/i386/cygwin.h (ENDFILE_SPEC): Link crtfastmath.o
whenever -mdaz-ftz is specified. Don't link crtfastmath.o when
-share or -mno-daz-ftz is specified.
* config/i386/darwin.h (ENDFILE_SPEC): Ditto.
* config/i386/mingw32.h (ENDFILE_SPEC): Ditto.
gcc/config/i386/cygwin.h
gcc/config/i386/darwin.h
gcc/config/i386/mingw32.h