From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1990) id 18D023858D20; Fri, 27 Jan 2023 03:26:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18D023858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674789974; bh=lAiNXE/PMjy6C5/4RXFiaR/Cw1cM2dutXhu9atet7co=; h=From:To:Subject:Date:From; b=vZX2tfXYE/ne3IvtHwpqgjTNjyDRNmHRb+XLf5fhOnGK9dv7p+/1+gs4+7uMOoT59 GHivrjxUCSXaFGC6xzH2N/13UU2vvpH7pEW+PFuyfHeiY6Xwq+wQa/6W5YbzbdHx+d GCJNcuBD0mAtflGyZ8j6EzdCpT/2bJEOGGxBDlvM= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Chenghua Xu To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-5424] LoongArch: Don't add crtfastmath.o for -shared X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/heads/master X-Git-Oldrev: 575056672b3fec0cb4f5ddafd2d4a8c42b83589b X-Git-Newrev: 476efe839e069e556b4b03cf6ec8c18870867960 Message-Id: <20230127032614.18D023858D20@sourceware.org> Date: Fri, 27 Jan 2023 03:26:14 +0000 (GMT) List-Id: https://gcc.gnu.org/g:476efe839e069e556b4b03cf6ec8c18870867960 commit r13-5424-g476efe839e069e556b4b03cf6ec8c18870867960 Author: Richard Biener Date: Fri Jan 13 09:01:12 2023 +0100 LoongArch: Don't add crtfastmath.o for -shared 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. Diff: --- 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 fb7106fd85f..aecaa02a199 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