From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by sourceware.org (Postfix) with ESMTPS id 41B363858C83 for ; Mon, 7 Feb 2022 21:09:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 41B363858C83 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dabbelt.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dabbelt.com Received: by mail-pj1-x102f.google.com with SMTP id h20-20020a17090adb9400b001b518bf99ffso283804pjv.1 for ; Mon, 07 Feb 2022 13:09:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20210112.gappssmtp.com; s=20210112; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=bdl+mLds8DJOneK+AqcEtr6tumy+ud/c108+8Jp69F0=; b=7ycY1gF3wgVS9+3dPvv0wc1PtrsH1a/+Rq5Et5oh8MLKSPfzwG0TFzOQ/Qgde565Zv CS+J233mN8W9ayPSiWf9mUQ0pFzzaJbmn14LRn2ypnyErqLJhvnZvPQ+kdYMPqDo/Y9b nGaMeEpMGASYsUpWEcjfJW+BCTDpMXIX4kUDtkfZV5EsljAmchrGRxdWdPfi66E9NQwM /B7cxWdRRdcYzPk7YXG2NFcN2BYYTksRchtJewohRlbVJgkWQMVqwPuI4Zw0bH0qRFMI BT4Gb4hDMvY/NQ3+zU40JLmr40vyEEni7fMxuEejQmm7bWdONnJBhoBDeQViL0PF62Yy 7uTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=bdl+mLds8DJOneK+AqcEtr6tumy+ud/c108+8Jp69F0=; b=HV052L/5VlLoJLLGKoz6p+nkErCEYvHeonbtWNqlQRFSIPJ+wm2WKacIRlo+HmAFXe U13vBG6ywgn/Evf9jEf8NOp4cccnjxqaKunKz9wHh+1ZhGU/RFnq4eCNdTjc7nSAU7o6 TvG1l4ufmlaPeWCym+mVRqatoQqkB929yiVWYnB9Ihi+22uFB53Axn6tyhl7XawTR3bw VCm1cy1HuiEBb3cgidx/RkZnwiCoTkNijrMtN3M4JjPD2/AHoEcFcd+iBNvFthoYlo/k +xuEOUntbQiKgoBuVQVQEZoPMmBf9tGjezk1g5kZLuvBIkk/oUwvSrpdbH6j+w8+Qa+T mhxA== X-Gm-Message-State: AOAM53388tVOhXrisRot9oE76Ga429f3Zc0HR6JjAoR0SVyGp9DIULF6 JPPnfaTPSRQUeCecJT5h9S6x7GwYf8nxAw== X-Google-Smtp-Source: ABdhPJzBjZkHkukASCBnoPzzR3MitWN0MgNUfb47Z+gfgHZLJcfAGc0nYDEQKVjGtUsv8FAnE9/9IQ== X-Received: by 2002:a17:902:e74a:: with SMTP id p10mr1325094plf.16.1644268143796; Mon, 07 Feb 2022 13:09:03 -0800 (PST) Received: from localhost ([12.3.194.138]) by smtp.gmail.com with ESMTPSA id mz4sm238405pjb.53.2022.02.07.13.09.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Feb 2022 13:09:03 -0800 (PST) Date: Mon, 07 Feb 2022 13:09:03 -0800 (PST) X-Google-Original-Date: Mon, 07 Feb 2022 13:08:35 PST (-0800) Subject: Re: [PATCH 1/2] RISC-V: Don't report mismatch warnings when versions are larger than 1.0. In-Reply-To: CC: binutils@sourceware.org, Jim Wilson , kito.cheng@sifive.com, Andrew Waterman From: Palmer Dabbelt To: aurelien@aurel32.net, Nelson Chu 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=-4.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Feb 2022 21:09:07 -0000 On Sun, 06 Feb 2022 04:26:33 PST (-0800), aurelien@aurel32.net wrote: > Hi, > > On 2021-12-30 08:00, Nelson Chu wrote: >> In general, the extension is ratified when it's version is 1.0, that means >> the versions larger than 1.0 should be compatible. Therefore, report the >> mismatch warnings for these compatible versions seems redundant and a little >> bit annoying. I know that there are some exceptions like zba 0.93 and e 1.9, >> but we could handle them specially in the future patches. >> >> bfd/ >> * elfnn-riscv.c (riscv_version_mismatch): Do not report the mismatch >> warnings when versions are larger than 1.0. >> ld/ >> * testsuite/ld-riscv-elf/attr-merge-arch-failed-01.d: Removed. >> * testsuite/ld-riscv-elf/attr-merge-arch-failed-01a.s: Removed. >> * testsuite/ld-riscv-elf/attr-merge-arch-failed-01b.s: Removed. >> * testsuite/ld-riscv-elf/attr-merge-arch-failed-ratified.d: Updated >> and renamed from attr-merge-arch-failed-02a testcase. >> * testsuite/ld-riscv-elf/attr-merge-arch-failed-ratified-a.s: Likewise. >> * testsuite/ld-riscv-elf/attr-merge-arch-failed-ratified-b.s: Likewise. >> * testsuite/ld-riscv-elf/attr-merge-arch-failed-ratified-c.s: Likewise. >> * testsuite/ld-riscv-elf/attr-merge-arch-failed-ratified-d.s: Likewise. >> * testsuite/ld-riscv-elf/ld-riscv-elf.exp: Updated. >> --- >> bfd/elfnn-riscv.c | 12 ++++++---- >> .../ld-riscv-elf/attr-merge-arch-failed-01.d | 11 --------- >> .../ld-riscv-elf/attr-merge-arch-failed-01a.s | 1 - >> .../ld-riscv-elf/attr-merge-arch-failed-01b.s | 1 - >> .../ld-riscv-elf/attr-merge-arch-failed-02.d | 27 ---------------------- >> .../ld-riscv-elf/attr-merge-arch-failed-02a.s | 1 - >> .../ld-riscv-elf/attr-merge-arch-failed-02b.s | 1 - >> .../ld-riscv-elf/attr-merge-arch-failed-02c.s | 1 - >> .../ld-riscv-elf/attr-merge-arch-failed-02d.s | 1 - >> .../attr-merge-arch-failed-ratified-a.s | 1 + >> .../attr-merge-arch-failed-ratified-b.s | 1 + >> .../attr-merge-arch-failed-ratified-c.s | 1 + >> .../attr-merge-arch-failed-ratified-d.s | 1 + >> .../ld-riscv-elf/attr-merge-arch-failed-ratified.d | 22 ++++++++++++++++++ >> ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp | 3 +-- >> 15 files changed, 35 insertions(+), 50 deletions(-) >> delete mode 100644 ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-01.d >> delete mode 100644 ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-01a.s >> delete mode 100644 ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-01b.s >> delete mode 100644 ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02.d >> delete mode 100644 ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02a.s >> delete mode 100644 ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02b.s >> delete mode 100644 ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02c.s >> delete mode 100644 ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02d.s >> create mode 100644 ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-ratified-a.s >> create mode 100644 ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-ratified-b.s >> create mode 100644 ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-ratified-c.s >> create mode 100644 ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-ratified-d.s >> create mode 100644 ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-ratified.d > > Any reason why this patch hasn't been merged yet? Those warnings are > causing many issues, for instance it adds dozen of thousands of failures > to the gcc testsuite, even when binutils is configured with > --with-isa-spec=2.2: Sorry, looks like we dropped the ball here. I remember having talked about just dropping all the version checks, as they're not really something sane to enforce at link time any more, but I can't find that discussion so I'm not sure if that's what got us distracted. I tried putting this on master and it fails the included ld-riscv-elf/attr-merge-arch-failed-ratified for me, not sure if I'm missing something here or if it wasn't passing to begin with and that's why it didn't get merged. Nelson, do you have a version of this that passes the tests? This also brings up an ugly question about 2.38: it's really way later then we should be considering taking anything, but it's also pretty unfriendly to introduce a bunch of new warnings that users are unlikely to care about. > | FAIL: gcc.target/riscv/pr84660.c (test for excess errors) > | Excess errors: > | /usr/bin/riscv64-linux-gnu-ld: warning: /build/gcc-9-WXLb8U/gcc-9-9.4.0/build/gcc/crti.o: mis-matched ISA version 2.0 for 'i' extension, the output version is 2.1 > | /usr/bin/riscv64-linux-gnu-ld: warning: /build/gcc-9-WXLb8U/gcc-9-9.4.0/build/gcc/crti.o: mis-matched ISA version 2.0 for 'a' extension, the output version is 2.1 > | /usr/bin/riscv64-linux-gnu-ld: warning: /build/gcc-9-WXLb8U/gcc-9-9.4.0/build/gcc/crti.o: mis-matched ISA version 2.0 for 'f' extension, the output version is 2.2 > | /usr/bin/riscv64-linux-gnu-ld: warning: /build/gcc-9-WXLb8U/gcc-9-9.4.0/build/gcc/crti.o: mis-matched ISA version 2.0 for 'd' extension, the output version is 2.2 > | /usr/bin/riscv64-linux-gnu-ld: warning: /build/gcc-9-WXLb8U/gcc-9-9.4.0/build/gcc/crtbeginS.o: mis-matched ISA version 2.0 for 'i' extension, the output version is 2.1 > | /usr/bin/riscv64-linux-gnu-ld: warning: /build/gcc-9-WXLb8U/gcc-9-9.4.0/build/gcc/crtbeginS.o: mis-matched ISA version 2.0 for 'a' extension, the output version is 2.1 > | /usr/bin/riscv64-linux-gnu-ld: warning: /build/gcc-9-WXLb8U/gcc-9-9.4.0/build/gcc/crtbeginS.o: mis-matched ISA version 2.0 for 'f' extension, the output version is 2.2 > | /usr/bin/riscv64-linux-gnu-ld: warning: /build/gcc-9-WXLb8U/gcc-9-9.4.0/build/gcc/crtbeginS.o: mis-matched ISA version 2.0 for 'd' extension, the output version is 2.2 > | /usr/bin/riscv64-linux-gnu-ld: warning: /tmp/cczGxSZh.o: mis-matched ISA version 2.0 for 'i' extension, the output version is 2.1 > | /usr/bin/riscv64-linux-gnu-ld: warning: /tmp/cczGxSZh.o: mis-matched ISA version 2.0 for 'a' extension, the output version is 2.1 > | /usr/bin/riscv64-linux-gnu-ld: warning: /tmp/cczGxSZh.o: mis-matched ISA version 2.0 for 'f' extension, the output version is 2.2 > | /usr/bin/riscv64-linux-gnu-ld: warning: /tmp/cczGxSZh.o: mis-matched ISA version 2.0 for 'd' extension, the output version is 2.2 > | /usr/bin/riscv64-linux-gnu-ld: warning: /build/gcc-9-WXLb8U/gcc-9-9.4.0/build/gcc/crtendS.o: mis-matched ISA version 2.0 for 'i' extension, the output version is 2.1 > | /usr/bin/riscv64-linux-gnu-ld: warning: /build/gcc-9-WXLb8U/gcc-9-9.4.0/build/gcc/crtendS.o: mis-matched ISA version 2.0 for 'a' extension, the output version is 2.1 > | /usr/bin/riscv64-linux-gnu-ld: warning: /build/gcc-9-WXLb8U/gcc-9-9.4.0/build/gcc/crtendS.o: mis-matched ISA version 2.0 for 'f' extension, the output version is 2.2 > | /usr/bin/riscv64-linux-gnu-ld: warning: /build/gcc-9-WXLb8U/gcc-9-9.4.0/build/gcc/crtendS.o: mis-matched ISA version 2.0 for 'd' extension, the output version is 2.2 > | /usr/bin/riscv64-linux-gnu-ld: warning: /build/gcc-9-WXLb8U/gcc-9-9.4.0/build/gcc/crtn.o: mis-matched ISA version 2.0 for 'i' extension, the output version is 2.1 > | /usr/bin/riscv64-linux-gnu-ld: warning: /build/gcc-9-WXLb8U/gcc-9-9.4.0/build/gcc/crtn.o: mis-matched ISA version 2.0 for 'a' extension, the output version is 2.1 > | /usr/bin/riscv64-linux-gnu-ld: warning: /build/gcc-9-WXLb8U/gcc-9-9.4.0/build/gcc/crtn.o: mis-matched ISA version 2.0 for 'f' extension, the output version is 2.2 > | /usr/bin/riscv64-linux-gnu-ld: warning: /build/gcc-9-WXLb8U/gcc-9-9.4.0/build/gcc/crtn.o: mis-matched ISA version 2.0 for 'd' extension, the output version is 2.2 > > Thanks, > Aurelien