diff options
author | Richard Biener <rguenther@suse.de> | 2023-01-13 08:47:59 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2023-01-13 12:14:17 +0100 |
commit | 0bf7131e539de4ca66b3c0eb72aa0afbd8f006dc (patch) | |
tree | 41a9af9d22fc0395489adcd1350b9940290c7d02 | |
parent | add71b95dd27d73d64eee0a9c8f748672b7050f5 (diff) | |
download | gcc-0bf7131e539de4ca66b3c0eb72aa0afbd8f006dc.zip gcc-0bf7131e539de4ca66b3c0eb72aa0afbd8f006dc.tar.gz gcc-0bf7131e539de4ca66b3c0eb72aa0afbd8f006dc.tar.bz2 |
aarch64: 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/aarch64/aarch64-elf-raw.h (ENDFILE_SPEC): Don't add
crtfastmath.o for -shared.
* config/aarch64/aarch64-freebsd.h (GNU_USER_TARGET_MATHFILE_SPEC):
Likewise.
* config/aarch64/aarch64-linux.h (GNU_USER_TARGET_MATHFILE_SPEC):
Likewise.
-rw-r--r-- | gcc/config/aarch64/aarch64-elf-raw.h | 2 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64-freebsd.h | 2 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64-linux.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/gcc/config/aarch64/aarch64-elf-raw.h b/gcc/config/aarch64/aarch64-elf-raw.h index d4d820a..fa5b452 100644 --- a/gcc/config/aarch64/aarch64-elf-raw.h +++ b/gcc/config/aarch64/aarch64-elf-raw.h @@ -25,7 +25,7 @@ #define STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s" #define ENDFILE_SPEC \ " crtend%O%s crtn%O%s " \ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}" + "%{Ofast|ffast-math|funsafe-math-optimizations:%{!shared:crtfastmath.o%s}}" #ifndef LINK_SPEC #define LINK_SPEC "%{h*} \ diff --git a/gcc/config/aarch64/aarch64-freebsd.h b/gcc/config/aarch64/aarch64-freebsd.h index 13beb37..2cf9cf6 100644 --- a/gcc/config/aarch64/aarch64-freebsd.h +++ b/gcc/config/aarch64/aarch64-freebsd.h @@ -50,7 +50,7 @@ #define LINK_SPEC FBSD_TARGET_LINK_SPEC AARCH64_ERRATA_LINK_SPEC #define GNU_USER_TARGET_MATHFILE_SPEC \ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}" + "%{Ofast|ffast-math|funsafe-math-optimizations:%{!shared:crtfastmath.o%s}}" #undef ENDFILE_SPEC #define ENDFILE_SPEC \ diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h index 5e4553d..61ed406 100644 --- a/gcc/config/aarch64/aarch64-linux.h +++ b/gcc/config/aarch64/aarch64-linux.h @@ -50,7 +50,7 @@ #define LINK_SPEC LINUX_TARGET_LINK_SPEC AARCH64_ERRATA_LINK_SPEC #define GNU_USER_TARGET_MATHFILE_SPEC \ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}" + "%{Ofast|ffast-math|funsafe-math-optimizations:%{!shared:crtfastmath.o%s}}" #undef ENDFILE_SPEC #define ENDFILE_SPEC \ |