public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: aurelien@aurel32.net, Nelson Chu <nelson.chu@sifive.com>
Cc: binutils@sourceware.org, Jim Wilson <jim.wilson.gcc@gmail.com>,
	kito.cheng@sifive.com, Andrew Waterman <andrew@sifive.com>
Subject: Re: [PATCH 1/2] RISC-V: Don't report mismatch warnings when versions are larger than 1.0.
Date: Mon, 07 Feb 2022 13:09:03 -0800 (PST)	[thread overview]
Message-ID: <mhng-f1c6f15d-e14e-42ce-b478-97a1df915e38@palmer-ri-x1c9> (raw)
In-Reply-To: <Yf++eZH+0Mfswrxf@aurel32.net>

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

      reply	other threads:[~2022-02-07 21:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-30 16:00 Nelson Chu
2021-12-30 16:00 ` [PATCH 2/2] RISC-V: Updated the default ISA spec to 20191213 Nelson Chu
2021-12-30 16:46   ` Palmer Dabbelt
2022-01-07 11:02     ` Nelson Chu
2022-02-06 12:26 ` [PATCH 1/2] RISC-V: Don't report mismatch warnings when versions are larger than 1.0 Aurelien Jarno
2022-02-07 21:09   ` Palmer Dabbelt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mhng-f1c6f15d-e14e-42ce-b478-97a1df915e38@palmer-ri-x1c9 \
    --to=palmer@dabbelt.com \
    --cc=andrew@sifive.com \
    --cc=aurelien@aurel32.net \
    --cc=binutils@sourceware.org \
    --cc=jim.wilson.gcc@gmail.com \
    --cc=kito.cheng@sifive.com \
    --cc=nelson.chu@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).