]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Add -mbranch-protection=gcs option
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 14 Nov 2024 16:15:03 +0000 (16:15 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Thu, 14 Nov 2024 16:15:03 +0000 (16:15 +0000)
commit56ded80b96b0f65327694912a6affbfc75e4e30d
treebdfca8940e63084ce605290025890b3aac6e9f47
parent269b6477744f25ab0a89b364295b86a4bce392f9
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.
gcc/config/aarch64/aarch64-protos.h
gcc/config/aarch64/aarch64.cc
gcc/config/aarch64/aarch64.opt
gcc/configure
gcc/configure.ac
gcc/doc/invoke.texi