]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ia64: Don't add crtfastmath.o for -shared
authorRichard Biener <rguenther@suse.de>
Fri, 13 Jan 2023 07:52:07 +0000 (08:52 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 27 Jan 2023 14:46:30 +0000 (15:46 +0100)
Don't add crtfastmath.o for -shared to avoid altering the FP
environment when loading a shared library.

PR target/55522
* config/ia64/linux.h (ENDFILE_SPEC): Don't add crtfastmath.o
for -shared.

gcc/config/ia64/linux.h

index b907cf025271fc01e015c5d7ccbc414f9ea48155..5dfd428aa17c8f344b94204de0cb0ea3af8fab19 100644 (file)
@@ -49,7 +49,7 @@ do {                                          \
 /* Similar to standard Linux, but adding -ffast-math support.  */
 #undef  ENDFILE_SPEC
 #define ENDFILE_SPEC \
-  "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
+  "%{Ofast|ffast-math|funsafe-math-optimizations:%{!shared:crtfastmath.o%s}} \
    %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
 
 /* Define this for shared library support because it isn't in the main