Skip to content

Commit 3c70b3c

Browse files
author
Jim Wilson
committed
RISC-V: Enable riscv attributes by default for all riscv targets.
These were only enabled for embedded elf originally because that was the safe option, and linux had no obvious use for them. But now that we have new extensions coming like V that affect process state and ABIs, the attributes are expected to be useful for linux, and may be required by the psABI. clang already emits them for all riscv targets. gcc/ * config.gcc (riscv*-*-*): If --with-riscv-attribute not used, turn it on for all riscv targets.
1 parent 5883e56 commit 3c70b3c

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

gcc/config.gcc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4605,14 +4605,7 @@ case "${target}" in
46054605
tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=0"
46064606
;;
46074607
""|default)
4608-
case "${target}" in
4609-
riscv*-*-elf*)
4610-
tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=1"
4611-
;;
4612-
*)
4613-
tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=0"
4614-
;;
4615-
esac
4608+
tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=1"
46164609
;;
46174610
*)
46184611
echo "--with-riscv-attribute=${with_riscv_attribute} is not supported. The argument must begin with yes, no or default." 1>&2

0 commit comments

Comments
 (0)