Message ID | 20230224022439.18998-1-palmer@rivosinc.com |
---|---|
State | Rejected |
Delegated to: | Kito Cheng |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 55023385482E for <patchwork@sourceware.org>; Fri, 24 Feb 2023 02:29:47 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by sourceware.org (Postfix) with ESMTPS id EF567385842B for <gcc-patches@gcc.gnu.org>; Fri, 24 Feb 2023 02:29:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EF567385842B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pj1-x1029.google.com with SMTP id k21-20020a17090aaa1500b002376652e160so1314722pjq.0 for <gcc-patches@gcc.gnu.org>; Thu, 23 Feb 2023 18:29:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; t=1677205766; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:from:to:cc:subject:date:message-id:reply-to; bh=r0gmkEIpinkWl0NtnwPEKeW+XUHPM5TVvis51UiLdho=; b=zlXWiHHQ8GIWoKr7xMMQCUJZimyhVevvLq7fmuFz1lTBcq8jIE93ySyr78x+Wb7ooU LCntkkqdQnCFlYjBSDYF12X/OGHIE+PsksX9N3ap/qsp1Uv0jOC/bsRW9NWrbfS38D9h KJVDwGMQqwarr1r1RuYcDqHEE1rKxSJCb2UBGhLj4sisdVNldA2tbZYTq362tzQNHDic GfTAGopOkKfPw+jWqi6Y3wKhlxRUf+I/fIMAglUemSnX3usG4PocS9NxSl+DmhnQgpsc CkYpatvaRJSxw68mbXp2AaoSAAk6X2Ijtb1Pgx2OKcjwFlFCr4Uy/lW2SVeZfhOQJ8IT 22xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677205766; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=r0gmkEIpinkWl0NtnwPEKeW+XUHPM5TVvis51UiLdho=; b=xir5yk+NoAQ/Pp2mynMFG6tBbH91sOGvBuGr2pCJa/9MH6KleCAQg8LyrBDu8wshz0 VB0a1zdXEfGQf0GwAv1acde9hdsRmAxcxyPsBWTcnP3ZR9sM5SaNhaowVRIp59rXxNfy h01ce9EhDBR8/PvGL5G3aKFi/KB29bNS3GStBvmoAm2qLVBaRruet/Aoc+K2aW1dpOmX SobyrVh46Eqg1IOOC5RqRzw/PdUGuHPD2aDZKnsOZ1lVrxUUr+s84HbKT2OXWfC+Xamg w3oGpjcEq26xQJ5aaO0TxQzUyttDB1Sd2CUj6QQT8TmfITZyFhKrpzb159vE3IlT2gBO GJ7g== X-Gm-Message-State: AO0yUKXpdqCDyN1IaB4yGWaTc17ElFS1OAqa59KEk1nLlTlCTU9ReRDP +H+ZRARDzTvRWsCy619AxYX4CQ== X-Google-Smtp-Source: AK7set9Wqro5aItvOGgybC15QCWcm/Yi34zD8zx0MC3uN6Swq4JFI8PSQOUT2v9qWoJLvVjB40nxzw== X-Received: by 2002:a05:6a20:54a4:b0:cb:1ee4:ede4 with SMTP id i36-20020a056a2054a400b000cb1ee4ede4mr17870973pzk.39.1677205766326; Thu, 23 Feb 2023 18:29:26 -0800 (PST) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id f23-20020a637557000000b004e8f7f23c4bsm5760241pgn.76.2023.02.23.18.29.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 18:29:25 -0800 (PST) Subject: [PATCH] RISC-V: Disable attribute generation by default Date: Thu, 23 Feb 2023 18:24:39 -0800 Message-Id: <20230224022439.18998-1-palmer@rivosinc.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Palmer Dabbelt <palmer@rivosinc.com> From: Palmer Dabbelt <palmer@rivosinc.com> To: gcc-patches@gcc.gnu.org X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
RISC-V: Disable attribute generation by default
|
|
Commit Message
Palmer Dabbelt
Feb. 24, 2023, 2:24 a.m. UTC
We generate a handful of attributes by default, but they don't really encode any useful information. We've broadly stopped ascribing any meaning to them in binutils; but they trip up LLVM, older toolchains, and users. So let's just turn them off by default. The old binaries will still be floating around, but at least this way we'll stop tripping over new incompatibilities. If we get to a point where there's some attributes that are defined that we can use then we can sort out how to turn those on without turning on the old ones, but unless I'm missing something the current set of attributes are too broken to be useful for anything. gcc/ChangeLog: * config.gcc (--with-riscv-attribute): Default to off. --- I know it's pretty late, but I'd like to target this for GCC-13. The Zmmul stuff has resulted in another round of build breakages that we're going to have to chase down, and while we could update everything to turn off the attributes it seems easier to just set the default. --- gcc/config.gcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
It did help people to identify what extension used in the binary, so I would prefer keep that enable by default. and lld is begin fix those merge issue, so the situation should be improved soon. Palmer Dabbelt <palmer@rivosinc.com> 於 2023年2月24日 週五 10:29 寫道: > We generate a handful of attributes by default, but they don't really > encode any useful information. We've broadly stopped ascribing any > meaning to them in binutils; but they trip up LLVM, older toolchains, > and users. So let's just turn them off by default. The old binaries > will still be floating around, but at least this way we'll stop tripping > over new incompatibilities. > > If we get to a point where there's some attributes that are defined that > we can use then we can sort out how to turn those on without turning on > the old ones, but unless I'm missing something the current set of > attributes are too broken to be useful for anything. > > gcc/ChangeLog: > > * config.gcc (--with-riscv-attribute): Default to off. > --- > I know it's pretty late, but I'd like to target this for GCC-13. The > Zmmul stuff has resulted in another round of build breakages that we're > going to have to chase down, and while we could update everything to > turn off the attributes it seems easier to just set the default. > --- > gcc/config.gcc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/config.gcc b/gcc/config.gcc > index c070e6ecd2e..52639cf26d6 100644 > --- a/gcc/config.gcc > +++ b/gcc/config.gcc > @@ -4596,7 +4596,7 @@ case "${target}" in > tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=0" > ;; > ""|default) > - tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=1" > + tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=0" > ;; > *) > echo > "--with-riscv-attribute=${with_riscv_attribute} is not supported. The > argument must begin with yes, no or default." 1>&2 > -- > 2.39.1 > >
On Fri, 24 Feb 2023 05:09:30 PST (-0800), gcc-patches@gcc.gnu.org wrote: > It did help people to identify what extension used in the binary, so I > would prefer keep that enable by default. IMO it actually hurts more than helps, as it's not really encoding what extensions are in the binary (or necessary to run the binary) but instead just encodes what was in -march (with some noise added due to the merging bugs and ISA string changes). Having the attributes just ends up tricking users into thinking the information is accurate when it's not. > and lld is begin fix those merge issue, so the situation should be improved > soon. If toolchains are just going to ignore then attributes then it's a pretty good sign they're not useful. > Palmer Dabbelt <palmer@rivosinc.com> 於 2023年2月24日 週五 10:29 寫道: > >> We generate a handful of attributes by default, but they don't really >> encode any useful information. We've broadly stopped ascribing any >> meaning to them in binutils; but they trip up LLVM, older toolchains, >> and users. So let's just turn them off by default. The old binaries >> will still be floating around, but at least this way we'll stop tripping >> over new incompatibilities. >> >> If we get to a point where there's some attributes that are defined that >> we can use then we can sort out how to turn those on without turning on >> the old ones, but unless I'm missing something the current set of >> attributes are too broken to be useful for anything. >> >> gcc/ChangeLog: >> >> * config.gcc (--with-riscv-attribute): Default to off. >> --- >> I know it's pretty late, but I'd like to target this for GCC-13. The >> Zmmul stuff has resulted in another round of build breakages that we're >> going to have to chase down, and while we could update everything to >> turn off the attributes it seems easier to just set the default. >> --- >> gcc/config.gcc | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/gcc/config.gcc b/gcc/config.gcc >> index c070e6ecd2e..52639cf26d6 100644 >> --- a/gcc/config.gcc >> +++ b/gcc/config.gcc >> @@ -4596,7 +4596,7 @@ case "${target}" in >> tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=0" >> ;; >> ""|default) >> - tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=1" >> + tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=0" >> ;; >> *) >> echo >> "--with-riscv-attribute=${with_riscv_attribute} is not supported. The >> argument must begin with yes, no or default." 1>&2 >> -- >> 2.39.1 >> >>
diff --git a/gcc/config.gcc b/gcc/config.gcc index c070e6ecd2e..52639cf26d6 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -4596,7 +4596,7 @@ case "${target}" in tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=0" ;; ""|default) - tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=1" + tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=0" ;; *) echo "--with-riscv-attribute=${with_riscv_attribute} is not supported. The argument must begin with yes, no or default." 1>&2