From patchwork Fri Jan 13 07:59:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 63134 X-Patchwork-Delegate: rearnsha@gcc.gnu.org Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3C5C0384F037 for ; Fri, 13 Jan 2023 08:00:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C5C0384F037 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673596824; bh=EBpZnpxeNh9zKCLYauVKZfeNYmZMKZsbbYDXPB0/IPY=; h=Date:To:cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=scu1DV9d4SFlCaVkOv6KAsZDjg1FEMytMwofI8fWQL07lr9/Ext10+zoZPzmDGT1+ wheKb5jCl66hJw4rdJCcpz1KR1LFKmYRS9U1whildpgWYNyC7m/zYvobxcQDJ8Lv1a HPy9rtL2PlhKtStWX2L77NsJmfS1IrzPLuE6G36w= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 25D703858D32 for ; Fri, 13 Jan 2023 07:59:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 25D703858D32 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 4D0834E556; Fri, 13 Jan 2023 07:59:53 +0000 (UTC) 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 34CCB13913; Fri, 13 Jan 2023 07:59:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id BKaPC3kPwWNvRwAAMHmgww (envelope-from ); Fri, 13 Jan 2023 07:59:53 +0000 Date: Fri, 13 Jan 2023 08:59:52 +0100 (CET) To: gcc-patches@gcc.gnu.org cc: richard.sandiford@arm.com Subject: [PATCH 1/9] aarch64: Don't add crtfastmath.o for -shared MIME-Version: 1.0 Message-Id: <20230113075953.34CCB13913@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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Don't add crtfastmath.o for -shared to avoid altering the FP environment when loading a shared library. PR target/55522 * config/aarch64/aarch64-elf-raw.h (ENDFILE_SPEC): Don't add crtfastmath.o for -shared. * config/aarch64/aarch64-freebsd.h (GNU_USER_TARGET_MATHFILE_SPEC): Likewise. * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_MATHFILE_SPEC): Likewise. --- gcc/config/aarch64/aarch64-elf-raw.h | 2 +- gcc/config/aarch64/aarch64-freebsd.h | 2 +- gcc/config/aarch64/aarch64-linux.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/config/aarch64/aarch64-elf-raw.h b/gcc/config/aarch64/aarch64-elf-raw.h index d4d820a9d54..fa5b4527ea0 100644 --- a/gcc/config/aarch64/aarch64-elf-raw.h +++ b/gcc/config/aarch64/aarch64-elf-raw.h @@ -25,7 +25,7 @@ #define STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s" #define ENDFILE_SPEC \ " crtend%O%s crtn%O%s " \ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}" + "%{Ofast|ffast-math|funsafe-math-optimizations:%{!shared:crtfastmath.o%s}}" #ifndef LINK_SPEC #define LINK_SPEC "%{h*} \ diff --git a/gcc/config/aarch64/aarch64-freebsd.h b/gcc/config/aarch64/aarch64-freebsd.h index 13beb3781b6..2cf9cf6f046 100644 --- a/gcc/config/aarch64/aarch64-freebsd.h +++ b/gcc/config/aarch64/aarch64-freebsd.h @@ -50,7 +50,7 @@ #define LINK_SPEC FBSD_TARGET_LINK_SPEC AARCH64_ERRATA_LINK_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 ENDFILE_SPEC #define ENDFILE_SPEC \ diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h index 5e4553d79f5..61ed4067fc5 100644 --- a/gcc/config/aarch64/aarch64-linux.h +++ b/gcc/config/aarch64/aarch64-linux.h @@ -50,7 +50,7 @@ #define LINK_SPEC LINUX_TARGET_LINK_SPEC AARCH64_ERRATA_LINK_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 ENDFILE_SPEC #define ENDFILE_SPEC \ From patchwork Fri Jan 13 08:00:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 63136 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9CB153881D2D for ; Fri, 13 Jan 2023 08:01:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9CB153881D2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673596884; bh=etUKuGxRLYPR3y9x7JxqdzhpPlQrkY8HM7qvQv6a6M8=; h=Date:To:cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=YZwGb6vvHk5uoqysSUHkx5Y5RxOwYR73LE8SWslshCFqlm8w38RkItVmm5rsh9jGn h3T++iFx2Jqh4qmyT/rCTj59rweZCC4lSTfRH95eej3x52TjBwB7yITZoxMcHADBcb 9Fp/9gG44Bi/RlewaLiWxrnK4iV5v6G/dCZOYBiA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 06AB838543A4; Fri, 13 Jan 2023 08:00:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 06AB838543A4 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 0610B4EA42; Fri, 13 Jan 2023 08:00:04 +0000 (UTC) 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 D7E8713913; Fri, 13 Jan 2023 08:00:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +8OZM4MPwWOjRwAAMHmgww (envelope-from ); Fri, 13 Jan 2023 08:00:03 +0000 Date: Fri, 13 Jan 2023 09:00:03 +0100 (CET) To: gcc-patches@gcc.gnu.org cc: rth@gcc.gnu.org Subject: [PATCH 2/9] alpha: Don't add crtfastmath.o for -shared MIME-Version: 1.0 Message-Id: <20230113080003.D7E8713913@imap2.suse-dmz.suse.de> X-Spam-Status: No, score=-11.8 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Don't add crtfastmath.o for -shared to avoid altering the FP environment when loading a shared library. PR target/55522 * config/alpha/linux.h (ENDFILE_SPEC): Don't add crtfastmath.o for -shared. --- gcc/config/alpha/linux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/alpha/linux.h b/gcc/config/alpha/linux.h index 9c3ad5a1097..7d2f0e844f9 100644 --- a/gcc/config/alpha/linux.h +++ b/gcc/config/alpha/linux.h @@ -106,7 +106,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}} \ %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" #define LINK_GCC_C_SEQUENCE_SPEC \ From patchwork Fri Jan 13 08:00:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 63135 X-Patchwork-Delegate: rearnsha@gcc.gnu.org Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 42D7A38493C3 for ; Fri, 13 Jan 2023 08:00:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 42D7A38493C3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673596844; bh=al+4TEJE6DTxWkKCk6bVfWqjgMlu4sgGzteeiCWhIHQ=; h=Date:To:cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=ujNuB57FsCSC1XelzFj40VmFJxC7ElJc2swbeyRXuVqVQl98q3v2dPpLHxRPC8dW5 oTdELiGpjXWRiBVGie6PcLnR2lGkDqvqdt5oasW+ER7UkVw2q1N/gmT6a7QuqU6IuP gNvZDm86161PAFX1RjkFlCTxoCSH+TXFDBEjKlqI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 6D6D1385C301 for ; Fri, 13 Jan 2023 08:00:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6D6D1385C301 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-out2.suse.de (Postfix) with ESMTPS id 862A75FF1D; Fri, 13 Jan 2023 08:00:15 +0000 (UTC) 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 6E41613913; Fri, 13 Jan 2023 08:00:15 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id kKTGGY8PwWPaRwAAMHmgww (envelope-from ); Fri, 13 Jan 2023 08:00:15 +0000 Date: Fri, 13 Jan 2023 09:00:15 +0100 (CET) To: gcc-patches@gcc.gnu.org cc: richard.earnshaw@arm.com Subject: [PATCH 3/9] arm: Don't add crtfastmath.o for -shared MIME-Version: 1.0 Message-Id: <20230113080015.6E41613913@imap2.suse-dmz.suse.de> X-Spam-Status: No, score=-11.8 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Don't add crtfastmath.o for -shared to avoid altering the FP environment when loading a shared library. PR target/55522 * config/arm/linux-eabi.h (ENDFILE_SPEC): Don't add crtfastmath.o for -shared. * config/arm/unknown-elf.h (STARTFILE_SPEC): Likewise. --- gcc/config/arm/linux-eabi.h | 2 +- gcc/config/arm/unknown-elf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h index 57f830f0176..a119875599d 100644 --- a/gcc/config/arm/linux-eabi.h +++ b/gcc/config/arm/linux-eabi.h @@ -121,7 +121,7 @@ #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}} " \ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) /* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we diff --git a/gcc/config/arm/unknown-elf.h b/gcc/config/arm/unknown-elf.h index 464d38b6cc6..397ac3f68b9 100644 --- a/gcc/config/arm/unknown-elf.h +++ b/gcc/config/arm/unknown-elf.h @@ -33,7 +33,7 @@ #undef STARTFILE_SPEC #define STARTFILE_SPEC \ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ + "%{Ofast|ffast-math|funsafe-math-optimizations:%{!shared:crtfastmath.o%s}} " \ UNKNOWN_ELF_STARTFILE_SPEC #define UNKNOWN_ELF_ENDFILE_SPEC "crtend%O%s crtn%O%s" From patchwork Fri Jan 13 08:00:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 63137 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 842A53884578 for ; Fri, 13 Jan 2023 08:01:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 842A53884578 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673596889; bh=ni8m09f2hDzrl8eflsh7ENnNwbCwLgu0eocK/RjKJ0k=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=FwKknTf4ixlJwuk2VlwAMZ8qSz/IC4zXb1UOZLbFEYPfcyIMcF2QUF+y1o29/637l PajSl8zkOmtq+5DPXMJl+0No8DX6gnG4nWkd+RGAexQu557tGd4ABVExAn+Z40DYbM HCUl33GWlSewdRlW3f0idZVVFMZkm6J1hSru5K90= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 8F5BE38460A6 for ; Fri, 13 Jan 2023 08:01:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8F5BE38460A6 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 4738E3860A for ; Fri, 13 Jan 2023 08:01:00 +0000 (UTC) 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 2837913913 for ; Fri, 13 Jan 2023 08:01:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4+69CLwPwWMaSAAAMHmgww (envelope-from ) for ; Fri, 13 Jan 2023 08:01:00 +0000 Date: Fri, 13 Jan 2023 09:00:59 +0100 (CET) To: gcc-patches@gcc.gnu.org Subject: [PATCH 4/9] ia64: Don't add crtfastmath.o for -shared MIME-Version: 1.0 Message-Id: <20230113080100.2837913913@imap2.suse-dmz.suse.de> X-Spam-Status: No, score=-11.8 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Don't add crtfastmath.o for -shared to avoid altering the FP environment when loading a shared library. There's no maintainer listed for ia64, I'll push this myself as obvious as last part of the series. PR target/55522 * config/ia64/linux.h (ENDFILE_SPEC): Don't add crtfastmath.o for -shared. --- gcc/config/ia64/linux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h index 93510098ccc..4106737cb23 100644 --- a/gcc/config/ia64/linux.h +++ b/gcc/config/ia64/linux.h @@ -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 From patchwork Fri Jan 13 08:01:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 63138 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F0CC43839DF2 for ; Fri, 13 Jan 2023 08:01:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F0CC43839DF2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673596906; bh=vCGCNiOrU4Zm+0EXh9k9tpIaNK4JEJZTFUU2coL83bg=; h=Date:To:cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=Cl2ZP+gLbIutopJFhVlvUuUKrIQesxarounLxg1N1xQfLEowZRhRd6B4K6Z4NGqdz c5Yt3fy+hVElydqAARbs7p3G/4up3HD01fZiNBurh/8zneI+XHg6vGyvM7PeffsfFY WgggBLWg/oEX7YA8EGglMir4qSStSHkj7VnFvhrc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 7C9383839DE8 for ; Fri, 13 Jan 2023 08:01:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7C9383839DE8 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 A063D3860A; Fri, 13 Jan 2023 08:01:12 +0000 (UTC) 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 88F1713913; Fri, 13 Jan 2023 08:01:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 99VzIMgPwWM0SAAAMHmgww (envelope-from ); Fri, 13 Jan 2023 08:01:12 +0000 Date: Fri, 13 Jan 2023 09:01:12 +0100 (CET) To: gcc-patches@gcc.gnu.org cc: xuchenghua@loongson.cn Subject: [PATCH 5/9] loongarch: Don't add crtfastmath.o for -shared MIME-Version: 1.0 Message-Id: <20230113080112.88F1713913@imap2.suse-dmz.suse.de> X-Spam-Status: No, score=-11.8 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" 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. --- 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 c5b1afe530d..1dc6add62d4 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 From patchwork Fri Jan 13 08:01:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 63139 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EA54D38930EC for ; Fri, 13 Jan 2023 08:02:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EA54D38930EC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673596951; bh=yZBwjjPdDZ7KmVzSMZnk71gfRf9L/EQEZAu8HgfMJas=; h=Date:To:cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=e5+MsZBmEn6Ok/irWnOMit8nBbAo5ymBBM/c1VWEjEuZJ+tCmnuyH+3FCeidk/ky5 Owe+lEbxjdGwwOd0s/axM64AgSaQr3+gzcZnA2HApgnfhCJdHTvjJueNsNl5RUusk9 Poo3aeBd/mlBZiml1oXkO6s11QePK8AQZ/FjwYDo= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 7CD763881D36 for ; Fri, 13 Jan 2023 08:01:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7CD763881D36 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 602114EA55; Fri, 13 Jan 2023 08:01:24 +0000 (UTC) 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 46AB613913; Fri, 13 Jan 2023 08:01:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4iABENQPwWNUSAAAMHmgww (envelope-from ); Fri, 13 Jan 2023 08:01:24 +0000 Date: Fri, 13 Jan 2023 09:01:23 +0100 (CET) To: gcc-patches@gcc.gnu.org cc: mfortune@gmail.com Subject: [PATCH 6/9] mips: Don't add crtfastmath.o for -shared MIME-Version: 1.0 Message-Id: <20230113080124.46AB613913@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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Don't add crtfastmath.o for -shared to avoid altering the FP environment when loading a shared library. PR target/55522 * config/mips/gnu-user.h (GNU_USER_TARGET_MATHFILE_SPEC): Don't add crtfastmath.o for -shared. --- gcc/config/mips/gnu-user.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h index 9a540b8b53f..a4e5380b589 100644 --- a/gcc/config/mips/gnu-user.h +++ b/gcc/config/mips/gnu-user.h @@ -139,7 +139,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); /* 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 ENDFILE_SPEC #define ENDFILE_SPEC \ GNU_USER_TARGET_MATHFILE_SPEC " " \ From patchwork Fri Jan 13 08:01:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 63140 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C7E023839DF1 for ; Fri, 13 Jan 2023 08:02:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C7E023839DF1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673596956; bh=X10oga7CLQhoT7RdvPBArErUH1QsWW9SduYPnWpivUI=; h=Date:To:cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=VV8Zl/Q+l0X1NgMKu10H96VnVjkYcrAcl13PVJ4QDXdXxV8ITGhpM+VPq5NxDrwwK I7I3UemclfXsVMtqQqQlnZMW8eSGcTH5ckpVhlTvrkp5ubprYqvbQ02UNwUWFarWI3 nLt//gk+67FM1UewUI6VlKMYjMjmQAFb59/1TweM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 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) 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) 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 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" 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). */ From patchwork Fri Jan 13 08:01:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 63141 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CDA0C3894C27 for ; Fri, 13 Jan 2023 08:02:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CDA0C3894C27 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673596969; bh=mltpKuflpdp6eEljxhO7zgYdBw56Nq0fLlpb2cpMsAM=; h=Date:To:cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=HuSSY0RB57gGUWqjyARzhKf9d+ahiN81DwUtsFiVJObT/ybYcPtGRgUUJLT4GQpDy YE/yfIpf9owXTZJdRy91iFwMNVJnbKi+8Ng4u3eKNIQXd4jkROpEyaweVu5AcipC0b Gv6Git68u5e/SbUHkgPVGIXaGHXjJ93IMS4beTAo= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id DCEE73888836 for ; Fri, 13 Jan 2023 08:01:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DCEE73888836 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 1EE854EA55; Fri, 13 Jan 2023 08:01:47 +0000 (UTC) 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 E61D613913; Fri, 13 Jan 2023 08:01:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 38ION+oPwWN4SAAAMHmgww (envelope-from ); Fri, 13 Jan 2023 08:01:46 +0000 Date: Fri, 13 Jan 2023 09:01:46 +0100 (CET) To: gcc-patches@gcc.gnu.org cc: ro@CeBiTec.Uni-Bielefeld.DE Subject: [PATCH 8/9] solaris2: Don't add crtfastmath.o for -shared MIME-Version: 1.0 Message-Id: <20230113080146.E61D613913@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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" 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. --- gcc/config/sol2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h index 05dbaffa8ea..616f9b91212 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 From patchwork Fri Jan 13 08:02:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 63142 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A8A5D3888C47 for ; Fri, 13 Jan 2023 08:03:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A8A5D3888C47 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673597016; bh=EdTRWlDTNPcmz3O4ccR+lmOHN93fv1mQpY8fzoqRge8=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=TsL9tlLcsi40kHteh+YuAGUbI+kHoaNqFGResAaSOy2eJqVPphvrUy0ulEyI9VXik m5OVpqocFDFCOJOAuYZQo8RiyKf9eWFDeIkjY326HF4Y2DuHhXYQUla6ZmeX/ssJr/ /l6KjZEwD6ycM3wpvcjwO8+XvrHS7Kgqbsym9eDc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id A1E403839DF3 for ; Fri, 13 Jan 2023 08:02:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A1E403839DF3 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 8775F38658 for ; Fri, 13 Jan 2023 08:02:03 +0000 (UTC) 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 73D8113913 for ; Fri, 13 Jan 2023 08:02:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id jXI6G/sPwWOXSAAAMHmgww (envelope-from ) for ; Fri, 13 Jan 2023 08:02:03 +0000 Date: Fri, 13 Jan 2023 09:02:03 +0100 (CET) To: gcc-patches@gcc.gnu.org Subject: [PATCH 9/9] Clarify -shared effect on crtfastmath.o MIME-Version: 1.0 Message-Id: <20230113080203.73D8113913@imap2.suse-dmz.suse.de> X-Spam-Status: No, score=-11.8 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" This rewords the note to not specifically mention crtfastmath.o but FP environment altering by -ffast-math or -Ofast. I'll push this after the target parts are approved. PR target/55522 * doc/invoke.texi (-shared): Clarify effect on -ffast-math and -Ofast FP environment side-effects. --- gcc/doc/invoke.texi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 701c228bd0a..7a6a83b2641 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -17693,8 +17693,9 @@ needs to build supplementary stub code for constructors to work. On multi-libbed systems, @samp{gcc -shared} must select the correct support libraries to link against. Failing to supply the correct flags may lead to subtle defects. Supplying them in cases where they are not necessary -is innocuous. For x86, crtfastmath.o will not be added when -@option{-shared} is specified. } +is innocuous. @option{-shared} suppresses the addition of startup code +to alter the floating-point environment as done with @option{-ffast-math} +or @option{-Ofast} on some targets.} @item -shared-libgcc @itemx -static-libgcc