aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/loongarch/gnu-user.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-01-13 09:01:12 +0100
committerChenghua Xu <paul.hua.gm@gmail.com>2023-01-27 11:25:18 +0800
commit476efe839e069e556b4b03cf6ec8c18870867960 (patch)
tree6952443631df8a5a4e866dcb03da0919880cc694 /gcc/config/loongarch/gnu-user.h
parent575056672b3fec0cb4f5ddafd2d4a8c42b83589b (diff)
downloadgcc-476efe839e069e556b4b03cf6ec8c18870867960.zip
gcc-476efe839e069e556b4b03cf6ec8c18870867960.tar.gz
gcc-476efe839e069e556b4b03cf6ec8c18870867960.tar.bz2
LoongArch: 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/loongarch/gnu-user.h (GNU_USER_TARGET_MATHFILE_SPEC): Don't add crtfastmath.o for -shared.
Diffstat (limited to 'gcc/config/loongarch/gnu-user.h')
-rw-r--r--gcc/config/loongarch/gnu-user.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/loongarch/gnu-user.h b/gcc/config/loongarch/gnu-user.h
index fb7106f..aecaa02 100644
--- a/gcc/config/loongarch/gnu-user.h
+++ b/gcc/config/loongarch/gnu-user.h
@@ -49,7 +49,7 @@ along with GCC; see the file COPYING3. If not see
/* Similar to standard Linux, but adding -ffast-math support. */
#undef GNU_USER_TARGET_MATHFILE_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 LIB_SPEC
#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC