public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Andreas Schwab <schwab@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-5491] riscv: Enable -fasynchronous-unwind-tables by default on Linux
Date: Mon, 30 Jan 2023 09:47:02 +0000 (GMT)	[thread overview]
Message-ID: <20230130094702.712A33858D32@sourceware.org> (raw)

https://gcc.gnu.org/g:3cd08f7168c196d7a481b9ed9f4289fd1f14eea8

commit r13-5491-g3cd08f7168c196d7a481b9ed9f4289fd1f14eea8
Author: Andreas Schwab <schwab@suse.de>
Date:   Wed Jan 25 12:00:09 2023 +0100

    riscv: Enable -fasynchronous-unwind-tables by default on Linux
    
    This follows the example of aarch64.
    
    gcc/:
            * common/config/riscv/riscv-common.cc
            (riscv_option_optimization_table)
            [TARGET_DEFAULT_ASYNC_UNWIND_TABLES]: Enable
            -fasynchronous-unwind-tables and -funwind-tables.
            * config.gcc (riscv*-*-linux*): Define
            TARGET_DEFAULT_ASYNC_UNWIND_TABLES.

Diff:
---
 gcc/common/config/riscv/riscv-common.cc | 4 ++++
 gcc/config.gcc                          | 1 +
 2 files changed, 5 insertions(+)

diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc
index 2e3116e7673..616e2f897b9 100644
--- a/gcc/common/config/riscv/riscv-common.cc
+++ b/gcc/common/config/riscv/riscv-common.cc
@@ -1756,6 +1756,10 @@ static const struct default_options riscv_option_optimization_table[] =
   {
     { OPT_LEVELS_1_PLUS, OPT_fsection_anchors, NULL, 1 },
     { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 },
+#if TARGET_DEFAULT_ASYNC_UNWIND_TABLES == 1
+    { OPT_LEVELS_ALL, OPT_fasynchronous_unwind_tables, NULL, 1 },
+    { OPT_LEVELS_ALL, OPT_funwind_tables, NULL, 1},
+#endif
     { OPT_LEVELS_NONE, 0, NULL, 0 }
   };
 
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 89f56047cfe..744b46fb3b0 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2417,6 +2417,7 @@ riscv*-*-linux*)
 	*) echo "Unknown value for enable_multilib"; exit 1
 	esac
 	tmake_file="${tmake_file} riscv/t-riscv riscv/t-linux"
+	tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1"
 	gnu_ld=yes
 	gas=yes
 	case $target in

                 reply	other threads:[~2023-01-30  9:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230130094702.712A33858D32@sourceware.org \
    --to=schwab@gcc.gnu.org \
    --cc=gcc-cvs@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).