diff options
author | liuhongt <hongtao.liu@intel.com> | 2023-01-13 16:19:47 +0800 |
---|---|---|
committer | liuhongt <hongtao.liu@intel.com> | 2023-01-18 10:46:17 +0800 |
commit | 159b0f41adc4c8ead45e12a523470381ce716ff2 (patch) | |
tree | 4a3cc5f7685c1f96f3b488d057cb78369cac73b5 /gcc | |
parent | 04d7cc165387d19e1433a4b2157d2bde7b95305b (diff) | |
download | gcc-159b0f41adc4c8ead45e12a523470381ce716ff2.zip gcc-159b0f41adc4c8ead45e12a523470381ce716ff2.tar.gz gcc-159b0f41adc4c8ead45e12a523470381ce716ff2.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/i386/cygwin.h | 2 | ||||
-rw-r--r-- | gcc/config/i386/darwin.h | 2 | ||||
-rw-r--r-- | gcc/config/i386/mingw32.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h index 4f219fb..b2c45ab 100644 --- a/gcc/config/i386/cygwin.h +++ b/gcc/config/i386/cygwin.h @@ -48,7 +48,7 @@ along with GCC; see the file COPYING3. If not see #undef ENDFILE_SPEC #define ENDFILE_SPEC \ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}\ + "%{mdaz-ftz:crtfastmath.o%s;Ofast|ffast-math|funsafe-math-optimizations:%{!shared:%{!mno-daz-ftz:crtfastmath.o%s}}} \ %{!shared:%:if-exists(default-manifest.o%s)}\ %{fvtable-verify=none:%s; \ fvtable-verify=preinit:vtv_end.o%s; \ diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h index 074a648..588bd66 100644 --- a/gcc/config/i386/darwin.h +++ b/gcc/config/i386/darwin.h @@ -110,7 +110,7 @@ along with GCC; see the file COPYING3. If not see #undef ENDFILE_SPEC #define ENDFILE_SPEC \ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ + "%{mdaz-ftz:crtfastmath.o%s;Ofast|ffast-math|funsafe-math-optimizations:%{!shared:%{!mno-daz-ftz:crtfastmath.o%s}}} \ %{mpc32:crtprec32.o%s} \ %{mpc64:crtprec64.o%s} \ %{mpc80:crtprec80.o%s}" TM_DESTRUCTOR diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h index f7379de..6a55baa 100644 --- a/gcc/config/i386/mingw32.h +++ b/gcc/config/i386/mingw32.h @@ -196,7 +196,7 @@ along with GCC; see the file COPYING3. If not see #undef ENDFILE_SPEC #define ENDFILE_SPEC \ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ + "%{mdaz-ftz:crtfastmath.o%s;Ofast|ffast-math|funsafe-math-optimizations:%{!shared:%{!mno-daz-ftz:crtfastmath.o%s}}} \ %{!shared:%:if-exists(default-manifest.o%s)}\ %{fvtable-verify=none:%s; \ fvtable-verify=preinit:vtv_end.o%s; \ |