public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-5424] LoongArch: Don't add crtfastmath.o for -shared
@ 2023-01-27 3:26 Chenghua Xu
0 siblings, 0 replies; only message in thread
From: Chenghua Xu @ 2023-01-27 3:26 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:476efe839e069e556b4b03cf6ec8c18870867960
commit r13-5424-g476efe839e069e556b4b03cf6ec8c18870867960
Author: Richard Biener <rguenther@suse.de>
Date: Fri Jan 13 09:01:12 2023 +0100
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.
Diff:
---
gcc/config/loongarch/gnu-user.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/loongarch/gnu-user.h b/gcc/config/loongarch/gnu-user.h
index fb7106fd85f..aecaa02a199 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-27 3:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-27 3:26 [gcc r13-5424] LoongArch: Don't add crtfastmath.o for -shared Chenghua Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).