From: Jim Wilson <jimw@sifive.com>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] RISC-V: Enable riscv attributes by default for all riscv targets.
Date: Thu, 3 Jun 2021 13:55:40 -0700 [thread overview]
Message-ID: <20210603205540.328093-1-jimw@sifive.com> (raw)
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.
Tested with a patched open embedded build and boot, and a native
toolchain build.
Committed.
Jim
gcc/
* config.gcc (riscv*-*-*): If --with-riscv-attribute not used,
turn TARGET_RISCV_ATTRIBUTES on for all riscv targets.
---
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
--
2.25.1
next reply other threads:[~2021-06-03 20:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-03 20:55 Jim Wilson [this message]
2021-06-03 21:20 ` Palmer Dabbelt
2021-06-04 1:13 ` Nelson Chu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210603205540.328093-1-jimw@sifive.com \
--to=jimw@sifive.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).