From: Richard Biener Date: Fri, 13 Jan 2023 07:56:28 +0000 (+0100) Subject: solaris2: Don't add crtfastmath.o for -shared X-Git-Tag: basepoints/gcc-14~2006 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6347bbec3efb625dfc8592fbb3099dc0364c5317;p=thirdparty%2Fgcc.git solaris2: 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/sol2.h (ENDFILE_SPEC): Don't add crtfastmath.o for -shared. --- diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h index 05dbaffa8eae..616f9b91212d 100644 --- a/gcc/config/sol2.h +++ b/gcc/config/sol2.h @@ -295,7 +295,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} \ + "%{Ofast|ffast-math|funsafe-math-optimizations:%{!shared:crtfastmath.o%s}} \ %(endfile_arch) %(endfile_vtv) %(endfile_crtend) crtn.o%s" #undef LINK_ARCH32_SPEC_BASE