From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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-out2.suse.de (Postfix) with ESMTPS id 862A75FF1D; Fri, 13 Jan 2023 08:00:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1673596815; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=al+4TEJE6DTxWkKCk6bVfWqjgMlu4sgGzteeiCWhIHQ=; b=rQIgA8V2MF3FVhqEpjxlVwTEXZrv1u/mWJUAADQaYw+849rs40riufwB0KyLAS0AjCdSpW 5m0nZ+rAeYfoxxq2vVmK8QhBE6soG1enKSCQrvHKwwWKNibtmahfU+yhhf6XQZS3N027AI NuaXTDPcdJYX8ZP5BUvPDWRBPK1SAwM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1673596815; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=al+4TEJE6DTxWkKCk6bVfWqjgMlu4sgGzteeiCWhIHQ=; b=qXuw24uUXzd259onqYPPt5vUZQ4vXdYAm4+v7pe5BYEEm18GawHxRETqfYdSQDgeWZGLEr iLpk6DQvgQ7pibCQ== 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) From: Richard Biener 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 Content-Type: text/plain; charset=US-ASCII 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 List-Id: 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" -- 2.35.3