aboutsummaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2024-11-14 16:15:03 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2024-11-14 16:15:03 +0000
commit56ded80b96b0f65327694912a6affbfc75e4e30d (patch)
treebdfca8940e63084ce605290025890b3aac6e9f47 /gcc/configure.ac
parent269b6477744f25ab0a89b364295b86a4bce392f9 (diff)
downloadgcc-56ded80b96b0f65327694912a6affbfc75e4e30d.zip
gcc-56ded80b96b0f65327694912a6affbfc75e4e30d.tar.gz
gcc-56ded80b96b0f65327694912a6affbfc75e4e30d.tar.bz2
aarch64: Add -mbranch-protection=gcs option
This enables Guarded Control Stack (GCS) compatible code generation. The "standard" branch-protection type enables it, and the default depends on the compiler default. gcc/ChangeLog: * config/aarch64/aarch64-protos.h (aarch_gcs_enabled): Declare. * config/aarch64/aarch64.cc (aarch_gcs_enabled): Define. (aarch_handle_no_branch_protection): Handle gcs. (aarch_handle_standard_branch_protection): Handle gcs. (aarch_handle_gcs_protection): New. * config/aarch64/aarch64.opt: Add aarch_enable_gcs. * configure: Regenerate. * configure.ac: Handle gcs in --enable-standard-branch-protection. * doc/invoke.texi: Document -mbranch-protection=gcs.
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index bdb22d5..bdd8cb0 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -4402,14 +4402,14 @@ case "$target" in
AC_ARG_ENABLE(standard-branch-protection,
[
AS_HELP_STRING([--enable-standard-branch-protection],
- [enable Branch Target Identification Mechanism and Return Address Signing by default for AArch64])
+ [enable Branch Target Identification Mechanism, Return Address Signing, and Guarded Control Stack by default for AArch64])
AS_HELP_STRING([--disable-standard-branch-protection],
- [disable Branch Target Identification Mechanism and Return Address Signing by default for AArch64])
+ [disable Branch Target Identification Mechanism, Return Address Signing, and Guarded Control Stack by default for AArch64])
],
[
case $enableval in
yes)
- tm_defines="${tm_defines} TARGET_ENABLE_BTI=1 TARGET_ENABLE_PAC_RET=1"
+ tm_defines="${tm_defines} TARGET_ENABLE_BTI=1 TARGET_ENABLE_PAC_RET=1 TARGET_ENABLE_GCS=1"
;;
no)
;;