[PATCH 1/2] RISC-V: Don't report mismatch warnings when versions are larger than 1.0.

Aurelien Jarno aurelien@aurel32.net
Sun Feb 6 12:26:33 GMT 2022


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:

| 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

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net


More information about the Binutils mailing list