From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id AC4A3385021B for ; Fri, 13 Jan 2023 08:01:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AC4A3385021B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5931022253; Fri, 13 Jan 2023 08:01:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1673596895; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=X10oga7CLQhoT7RdvPBArErUH1QsWW9SduYPnWpivUI=; b=pF37xuVo+qDix5HONPr8Sy2DsWwRKD6Hg71aqLRXtKJRa+uBB/31MO27Ss0h/tTDSHTwcN mnG9S2NrY1TxY7oTWcuidn3SJWuRLgzb22hCTwAXODbrvpI03aIfV2B3ZHnIwiWWdhtkzC cbIe6nccbEdO3vo1Isp419w45MTvpYU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1673596895; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=X10oga7CLQhoT7RdvPBArErUH1QsWW9SduYPnWpivUI=; b=tnwz1pJSEyPst9NbBexdJmGTxtxFTJ6C6b4xWwUg3hTQZO3bEzlSL8t6r+IYYSSt/pQLNZ iAe2snQiyXoRCoDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 43B3813913; Fri, 13 Jan 2023 08:01:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4e6JD98PwWNuSAAAMHmgww (envelope-from ); Fri, 13 Jan 2023 08:01:35 +0000 Date: Fri, 13 Jan 2023 09:01:34 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org cc: ebotcazou@libertysurf.fr Subject: [PATCH 7/9] sparc: Don't add crtfastmath.o for -shared MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Message-Id: <20230113080135.43B3813913@imap2.suse-dmz.suse.de> X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Don't add crtfastmath.o for -shared to avoid altering the FP environment when loading a shared library. PR target/55522 * config/sparc/freebsd.h (ENDFILE_SPEC): Don't add crtfastmath.o for -shared. * config/sparc/linux.h (ENDFILE_SPEC): Likewise. * config/sparc/linux64.h (ENDFILE_SPEC): Likewise. * config/sparc/sp-elf.h (ENDFILE_SPEC): Likewise. * config/sparc/sp64-elf.h (ENDFILE_SPEC): Likewise. --- gcc/config/sparc/freebsd.h | 2 +- gcc/config/sparc/linux.h | 2 +- gcc/config/sparc/linux64.h | 2 +- gcc/config/sparc/sp-elf.h | 2 +- gcc/config/sparc/sp64-elf.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gcc/config/sparc/freebsd.h b/gcc/config/sparc/freebsd.h index 73850a31f58..a5aa3679547 100644 --- a/gcc/config/sparc/freebsd.h +++ b/gcc/config/sparc/freebsd.h @@ -127,7 +127,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}} " \ FBSD_ENDFILE_SPEC /* We use GNU ld so undefine this so that attribute((init_priority)) works. */ diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h index 6a809e9092d..48386884d05 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h @@ -30,7 +30,7 @@ along with GCC; see the file COPYING3. If not see #undef ENDFILE_SPEC #define ENDFILE_SPEC \ GNU_USER_TARGET_ENDFILE_SPEC \ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}" + "%{Ofast|ffast-math|funsafe-math-optimizations:%{!shared:crtfastmath.o%s}}" /* -mcpu=native handling only makes sense with compiler running on a SPARC chip. */ diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index d08a2ef96fe..4132cee4c8c 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -47,7 +47,7 @@ along with GCC; see the file COPYING3. If not see #undef ENDFILE_SPEC #define ENDFILE_SPEC \ GNU_USER_TARGET_ENDFILE_SPEC \ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}" + "%{Ofast|ffast-math|funsafe-math-optimizations:%{!shared:crtfastmath.o%s}}" /* The default code model. */ #undef SPARC_DEFAULT_CMODEL diff --git a/gcc/config/sparc/sp-elf.h b/gcc/config/sparc/sp-elf.h index 53f03b951db..8bd2f54f05d 100644 --- a/gcc/config/sparc/sp-elf.h +++ b/gcc/config/sparc/sp-elf.h @@ -32,7 +32,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}} \ crtend.o%s crtn.o%s" /* Don't set the target flags, this is done by the linker script */ diff --git a/gcc/config/sparc/sp64-elf.h b/gcc/config/sparc/sp64-elf.h index dc918c6ae24..866db10a343 100644 --- a/gcc/config/sparc/sp64-elf.h +++ b/gcc/config/sparc/sp64-elf.h @@ -44,7 +44,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}} \ crtend.o%s crtn.o%s" /* Use the default (for now). */ -- 2.35.3