RISC-V: Fix riscv gas/ld testsuites failures for big endian.
authorMarcus Comstedt <marcus@mc.pp.se>
Tue, 5 Jan 2021 21:50:39 +0000 (22:50 +0100)
committerNelson Chu <nelson.chu@sifive.com>
Wed, 6 Jan 2021 10:01:41 +0000 (18:01 +0800)
commitf36ce378b46fd6a1451553e886502d39bec6edea
treed4af1f6edbf433bad6639c48a62fb981c00efb17
parentfbc09e7af715f19f6e5c700a9df6d13cdd05e1e5
RISC-V: Fix riscv gas/ld testsuites failures for big endian.

Add riscv_choose_[ilp32|lp64]_emul, and use them to choose the correct
linker script rather than set elf[32|64]lriscv directly.

gas/
    * testsuite/gas/riscv/li32.d: Accept bigriscv in addition
    to littleriscv.
    * testsuite/gas/riscv/li64.d: Likewise.
    * testsuite/gas/riscv/lla32.d: Likewise.
    * testsuite/gas/riscv/lla64.d: Likewise.
    * testsuite/gas/riscv/march-ok-g2.d: Likewise.
    * testsuite/gas/riscv/march-ok-g2_p1.d: Likewise.
    * testsuite/gas/riscv/march-ok-g2p0.d: Likewise.
    * testsuite/gas/riscv/march-ok-i2p0.d: Likewise.
    * testsuite/gas/riscv/march-ok-i2p0m2_a2f2.d: Likewise.
    * testsuite/gas/riscv/march-ok-nse-with-version.d: Likewise.
    * testsuite/gas/riscv/march-ok-two-nse.d: Likewise.

ld/
    * testsuite/ld-riscv-elf/ld-riscv-elf.exp: Added
    riscv_choose_[ilp32|lp64]_emul to choose the correct linker script.
    * testsuite/ld-riscv-elf/attr-merge-arch-01.d: Call
    riscv_choose_[ilp32|lp64]_emul instead of hardcoding elf[32|64]lriscv.
    * testsuite/ld-riscv-elf/attr-merge-arch-02.d: Likewise.
    * testsuite/ld-riscv-elf/attr-merge-arch-03.d: Likewise.
    * testsuite/ld-riscv-elf/attr-merge-arch-failed-01.d: Likewise.
    * testsuite/ld-riscv-elf/attr-merge-arch-failed-02.d: Likewise.
    * testsuite/ld-riscv-elf/c-lui-2.d: Likewise.
    * testsuite/ld-riscv-elf/c-lui.d: Likewise.
    * testsuite/ld-riscv-elf/call-relax.d: Likewise.
    * testsuite/ld-riscv-elf/pcrel-lo-addend-2.d: Likewise.
    * testsuite/ld-riscv-elf/pcrel-lo-addend.d: Likewise.
    * testsuite/ld-riscv-elf/weakref32.d: Accept bigriscv in addition
    to littleriscv.
    * testsuite/ld-riscv-elf/weakref64.d: Likewise.
26 files changed:
gas/ChangeLog
gas/testsuite/gas/riscv/li32.d
gas/testsuite/gas/riscv/li64.d
gas/testsuite/gas/riscv/lla32.d
gas/testsuite/gas/riscv/lla64.d
gas/testsuite/gas/riscv/march-ok-g2.d
gas/testsuite/gas/riscv/march-ok-g2_p1.d
gas/testsuite/gas/riscv/march-ok-g2p0.d
gas/testsuite/gas/riscv/march-ok-i2p0.d
gas/testsuite/gas/riscv/march-ok-i2p0m2_a2f2.d
gas/testsuite/gas/riscv/march-ok-nse-with-version.d
gas/testsuite/gas/riscv/march-ok-two-nse.d
ld/ChangeLog
ld/testsuite/ld-riscv-elf/attr-merge-arch-01.d
ld/testsuite/ld-riscv-elf/attr-merge-arch-02.d
ld/testsuite/ld-riscv-elf/attr-merge-arch-03.d
ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-01.d
ld/testsuite/ld-riscv-elf/attr-merge-arch-failed-02.d
ld/testsuite/ld-riscv-elf/c-lui-2.d
ld/testsuite/ld-riscv-elf/c-lui.d
ld/testsuite/ld-riscv-elf/call-relax.d
ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp
ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2.d
ld/testsuite/ld-riscv-elf/pcrel-lo-addend.d
ld/testsuite/ld-riscv-elf/weakref32.d
ld/testsuite/ld-riscv-elf/weakref64.d