RISC-V: Add riscv{32,64}be with big endian as default
authorMarcus Comstedt <marcus@mc.pp.se>
Fri, 19 Mar 2021 19:49:04 +0000 (20:49 +0100)
committerKito Cheng <kito.cheng@sifive.com>
Tue, 23 Mar 2021 09:31:13 +0000 (17:31 +0800)
commitcd1e2f632532d04c67a17820cb25826f8b0febac
treeb3b7949338db616d7d2d4837ed52049265bd0a73
parenta9604fcbb29e457a4824a496905057dcc2e5d78a
RISC-V: Add riscv{32,64}be with big endian as default

gcc/
* common/config/riscv/riscv-common.c
(TARGET_DEFAULT_TARGET_FLAGS): Set default endianness.
* config.gcc (riscv32be-*, riscv64be-*): Set
TARGET_BIG_ENDIAN_DEFAULT to 1.
* config/riscv/elf.h (LINK_SPEC): Change -melf* value
depending on default endianness.
* config/riscv/freebsd.h (LINK_SPEC): Likewise.
* config/riscv/linux.h (LINK_SPEC): Likewise.
* config/riscv/riscv.c (TARGET_DEFAULT_TARGET_FLAGS): Set
default endianness.
* config/riscv/riscv.h (DEFAULT_ENDIAN_SPEC): New macro.
gcc/common/config/riscv/riscv-common.c
gcc/config.gcc
gcc/config/riscv/elf.h
gcc/config/riscv/freebsd.h
gcc/config/riscv/linux.h
gcc/config/riscv/riscv.c
gcc/config/riscv/riscv.h