From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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 A063D3860A; Fri, 13 Jan 2023 08:01:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1673596872; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=vCGCNiOrU4Zm+0EXh9k9tpIaNK4JEJZTFUU2coL83bg=; b=sO+GRtWgkC0tRrHN/TA8puV7EYVi8ScxrdZQkvsY//ZfTekuBWLU/zzgfz/aq/SoMtZCWm SPB49buCGGOn5x3v6bclI9fACAoM2d2VQI23o65t0WVpOnjWzqtgAnlLIqLAYoBcT+NT81 xtyUwo//+q89itgGqqtb7xlAW3WOveM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1673596872; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=vCGCNiOrU4Zm+0EXh9k9tpIaNK4JEJZTFUU2coL83bg=; b=8l5pSbqISRrA4VAZ/wH6Ej0j/jw82E6tO0d3bmkn4fu5ZxuGHXiPpU/hMQjhXRPYG+1kzE plbQrAqpQIGck5Cg== 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) From: Richard Biener 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 Content-Type: text/plain; charset=US-ASCII 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 List-Id: 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 -- 2.35.3