From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by sourceware.org (Postfix) with ESMTPS id A54353857C45 for ; Sat, 25 Feb 2023 00:42:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A54353857C45 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-x102a.google.com with SMTP id qi12-20020a17090b274c00b002341621377cso4545237pjb.2 for ; Fri, 24 Feb 2023 16:42:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; t=1677285728; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=MRsmzqdiadwwPpDA/50NlKi/jhuCogRh4xo8CI8LqJw=; b=nUvskIHZkTZ6zqztWvY52a1xcKvVictO0KGHZjA2igNUAaxtSbi82Jb6Syyx8BYZkC cO0PurUu+zM+jQj2CpimSHCaIwICSmTrHiWeLl1J59j/HmCxvJVc3mwj53nd3m9y4zHd QhU15FHIPYrxn6f5JFt0N32eAq2pws0RRlr5DD0frY/ONacoGZAaJE/yQUqBZHWF9nBX kzXL78svkikvvEeRQBbfqqsbQZAhubUKUYpX8CUrEeMS2PTSifpG0qLFPhrpyJc67OK7 /PQx1itukItBqyMNwnYUmdy0e49QrkC0MUJ1yMytC5tkeHmJ5xlRHy6WuzIwSzhHPJIV Ltlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677285728; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MRsmzqdiadwwPpDA/50NlKi/jhuCogRh4xo8CI8LqJw=; b=sTC3DWzH9tUeUaxiaTnz510l9kYEgYbYl+jhPuRUoNByOYsgnjP1j4J/JjxoA1thFA glf/m1wDv9Iysc1H1kmijaIrE/+RXfRkvhLdcmHvJjAmIPvVzmrTsLNaJS7mQD1gNVFH 0da72oziAVmhWjo+6TV4kSsSHsoSCw9uUJ6+uLXg8xJVe5SRohiPOvAGwhtcWgRSL4aQ 4qyo8WElbmUsqs+eWa40gtl3nZY8SA6+oai8MDlygo/X+Pjs4L8w5GvPMTGQV93Fxy/z qjl50aZ89VHzxLV7S8dTJTSgtLHee7KzJJfQgnumACR3+eKWVCYI5g1npSV8KwXr+UTl n0dQ== X-Gm-Message-State: AO0yUKU6Rxh+5yeTJ4bc4AHSh8gxQPDVhMtF55yCap2vUojQNVkql+GW BHKavZKMvPObnQPF5jFw7ECwHfrjaL1TlOVe X-Google-Smtp-Source: AK7set/ttmehNbN8PPuhINxg6dAVgAkHs63lKq8AHWvocyF6huQ6RqG6CM1uOm1oSCXtFiKeSyPZNg== X-Received: by 2002:a17:902:ecc7:b0:19a:9642:dee8 with SMTP id a7-20020a170902ecc700b0019a9642dee8mr20367479plh.0.1677285728244; Fri, 24 Feb 2023 16:42:08 -0800 (PST) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id k10-20020a170902ba8a00b0019c919bccf8sm97900pls.86.2023.02.24.16.42.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 16:42:07 -0800 (PST) Date: Fri, 24 Feb 2023 16:42:07 -0800 (PST) X-Google-Original-Date: Fri, 24 Feb 2023 16:40:35 PST (-0800) Subject: Re: [PATCH] RISC-V: Disable attribute generation by default In-Reply-To: CC: gcc-patches@gcc.gnu.org From: Palmer Dabbelt To: Kito Cheng Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00,BODY_8BITS,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 List-Id: 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 於 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 >> >>