From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by sourceware.org (Postfix) with ESMTPS id DA92A3858C83 for ; Tue, 17 Jan 2023 07:11:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DA92A3858C83 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yb1-xb30.google.com with SMTP id p188so32922645yba.5 for ; Mon, 16 Jan 2023 23:11:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MWaL117yw65mnpvzt90NdT2Hbs6WL3ALx+Nx43TQ8uc=; b=gYVa5AqRdKNuU+6N4TtQfCbvl5TfR7Mkep8byPEocE0smByfz3AnISEUEYriHpXQrT B1Imw8j3p8K+Q+QY3DHvquu7yUJ+ei0XsNVy2hO21JBh7br5GQ/n3O1QKtBywV2lbkCd 3dltp4YZRXsmh5cJhpdGn9Ye5+EY6iNjgEoWI4XgIp8/udH4xB0dxuozMBygSeIkdfYR TIRKBqPhYDAlRHIlji0QNL0YWf/cbxlBDoJVT5MDPyXaIpfvhxxO1D4Xlp8VQGyI7W/8 gPL1ooHvzoEhPNFt4BawhNqSUFFjrXu+ciMelMpeIRQsivnGGQm4ilwlYQpwOzlznoZn wNfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MWaL117yw65mnpvzt90NdT2Hbs6WL3ALx+Nx43TQ8uc=; b=ojk2y0mf/Pa2U7I62zxBluuv0DTzEe1McuIGi2CBqT91ywfyZ5a65S9G0JmZ7xQAyZ O6azEpGhPFH+MHbOJIaaAcAfPWojJH3meYTMmaGTZIfdXJD3ZPNN2h9BE9OaYpkxep+o K5LFHxKfXz3j0J4Aq8p3al6VDXyj3SADSJc9juIVlRPQdARYBhQcnXlCfcmVf88soXW8 goWJ0NMuIdho/oiqo4x/p9jS4yi05V+GLvB+mjb1SH+qsPcwpKnfF4/upl7OUbapEwR3 lkT783HcIqkXx/O0RQqS0hDemfsPO8KCYmgrOC7PNB6J68x+IkE6623Ee+heKewQdb1z 0r4w== X-Gm-Message-State: AFqh2kovDouyybDtzI5O7LltopbhBF9xNHSfc1SuanUpdApnOOA/OrAo VNSMEx/0fbPIzd/E/+qt0eO3B2a+mWjGyUmgJdY= X-Google-Smtp-Source: AMrXdXuO9xtEwXgXy8JB8WCmEvkuEcLOMFHNVnyGOxP+wKzo4V8tkKf51FPNGmo2qM4wSIU0XkCNKJvxieCVEOWXyzg= X-Received: by 2002:a25:740b:0:b0:7b6:9dcb:6588 with SMTP id p11-20020a25740b000000b007b69dcb6588mr294542ybc.251.1673939499175; Mon, 16 Jan 2023 23:11:39 -0800 (PST) MIME-Version: 1.0 References: <20230113095651.1367699-1-hongtao.liu@intel.com> In-Reply-To: <20230113095651.1367699-1-hongtao.liu@intel.com> From: Hongtao Liu Date: Tue, 17 Jan 2023 15:11:28 +0800 Message-ID: Subject: Re: [PATCH] Don't add crtfastmath.o for -shared. To: liuhongt Cc: gcc-patches@gcc.gnu.org, hjl.tools@gmail.com, ubizjak@gmail.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,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: On Fri, Jan 13, 2023 at 5:56 PM liuhongt wrote: > > Patches [1] and [2] fixed PR55522 for x86-linux but left all other x86 > targets unfixed (x86-cygwin, x86-darwin and x86-mingw32). > This patch applies a similar change to other specs using crtfastmath.o. > > Ok for trunk? > The patches in [1],[2] are already approved, and these 2 patches just apply them to other 3 targets, so I assume it should be ok, and i'm going to push the patch to trunk. > [1] https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608528.html > [2] https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608529.html > > gcc/ChangeLog: > > PR target/55522 > * config/i386/cygwin.h (ENDFILE_SPEC): Link crtfastmath.o > whenever -mdaz-ftz is specified. Don't link crtfastmath.o when > -share or -mno-daz-ftz is specified. > * config/i386/darwin.h (ENDFILE_SPEC): Ditto. > * config/i386/mingw32.h (ENDFILE_SPEC): Ditto. > --- > gcc/config/i386/cygwin.h | 2 +- > gcc/config/i386/darwin.h | 2 +- > gcc/config/i386/mingw32.h | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h > index 0a604d65b32..d795ee1e3c5 100644 > --- a/gcc/config/i386/cygwin.h > +++ b/gcc/config/i386/cygwin.h > @@ -48,7 +48,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}\ > + "%{mdaz-ftz:crtfastmath.o%s;Ofast|ffast-math|funsafe-math-optimizations:%{!shared:%{!mno-daz-ftz:crtfastmath.o%s}}} \ > %{!shared:%:if-exists(default-manifest.o%s)}\ > %{fvtable-verify=none:%s; \ > fvtable-verify=preinit:vtv_end.o%s; \ > diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h > index 5bcb7111114..ac198db0d9c 100644 > --- a/gcc/config/i386/darwin.h > +++ b/gcc/config/i386/darwin.h > @@ -110,7 +110,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} \ > + "%{mdaz-ftz:crtfastmath.o%s;Ofast|ffast-math|funsafe-math-optimizations:%{!shared:%{!mno-daz-ftz:crtfastmath.o%s}}} \ > %{mpc32:crtprec32.o%s} \ > %{mpc64:crtprec64.o%s} \ > %{mpc80:crtprec80.o%s}" TM_DESTRUCTOR > diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h > index 19a98c3d995..4e5b486a3da 100644 > --- a/gcc/config/i386/mingw32.h > +++ b/gcc/config/i386/mingw32.h > @@ -196,7 +196,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} \ > + "%{mdaz-ftz:crtfastmath.o%s;Ofast|ffast-math|funsafe-math-optimizations:%{!shared:%{!mno-daz-ftz:crtfastmath.o%s}}} \ > %{!shared:%:if-exists(default-manifest.o%s)}\ > %{fvtable-verify=none:%s; \ > fvtable-verify=preinit:vtv_end.o%s; \ > -- > 2.31.1 > -- BR, Hongtao