From: Jim Wilson Date: Thu, 3 Jun 2021 20:50:34 +0000 (-0700) Subject: RISC-V: Enable riscv attributes by default for all riscv targets. X-Git-Tag: basepoints/gcc-13~7115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c70b3ca1ef58f302bf8c16d9e7c7bb8626408bf;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/config.gcc b/gcc/config.gcc index 92fad8e20ca2..6833a6c13d94 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -4605,14 +4605,7 @@ case "${target}" in tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=0" ;; ""|default) - case "${target}" in - riscv*-*-elf*) - tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=1" - ;; - *) - tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=0" - ;; - esac + tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=1" ;; *) echo "--with-riscv-attribute=${with_riscv_attribute} is not supported. The argument must begin with yes, no or default." 1>&2