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 7CD763881D36 for ; Fri, 13 Jan 2023 08:01:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7CD763881D36 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 602114EA55; Fri, 13 Jan 2023 08:01:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1673596884; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=yZBwjjPdDZ7KmVzSMZnk71gfRf9L/EQEZAu8HgfMJas=; b=ydeqLKOCoMOkhjzc36hsp5gfzLtzNe2rNlrtoen7/enxsxbnYNGhZvtPMs8qpQzb/Gvx/k zbM8/oPNEm+xvczha9k0fe+Mae1FgFoWuO0CUAHVs6j69lis2l7Z8mLq7jo/WJ2kBoB0WJ rbz1xd66z8YCpj8ltWQlw22YB+QRN/A= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1673596884; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=yZBwjjPdDZ7KmVzSMZnk71gfRf9L/EQEZAu8HgfMJas=; b=30Y2VSTvZjmZ6DA9+gFHihOxMnmb9ADD+zSriagwe9DieaUUtp/TUnlimDIvcjoRT8xaZV 2r9xd9S1TvfLKBAg== 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) From: Richard Biener 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 Content-Type: text/plain; charset=US-ASCII 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 List-Id: 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 " " \ -- 2.35.3