From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1003) id E508A3857801; Thu, 3 Jun 2021 20:55:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E508A3857801 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jim Wilson To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-1198] RISC-V: Enable riscv attributes by default for all riscv targets. X-Act-Checkin: gcc X-Git-Author: Jim Wilson X-Git-Refname: refs/heads/master X-Git-Oldrev: 5883e567564c5b3caecba0c13e8a360a14cdc846 X-Git-Newrev: 3c70b3ca1ef58f302bf8c16d9e7c7bb8626408bf Message-Id: <20210603205527.E508A3857801@sourceware.org> Date: Thu, 3 Jun 2021 20:55:27 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jun 2021 20:55:28 -0000 https://gcc.gnu.org/g:3c70b3ca1ef58f302bf8c16d9e7c7bb8626408bf commit r12-1198-g3c70b3ca1ef58f302bf8c16d9e7c7bb8626408bf Author: Jim Wilson Date: Thu Jun 3 13:50:34 2021 -0700 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: --- gcc/config.gcc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index 92fad8e20ca..6833a6c13d9 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