commit: 8dc7a7e2b4735a778b02fd89cb056f22381458e5
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 21 16:58:46 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 21 16:59:18 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8dc7a7e2
flag-o-matic.eclass: allow hardened compare/control flow flags
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/flag-o-matic.eclass | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index c0b042d5348d..0c56ac5b6bf4 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -56,6 +56,10 @@ _setup-allowed-flags() {
'-fcf-protection=*'
-fbounds-check -fbounds-checking
-fno-PIE -fno-pie -nopie -no-pie
+ -fharden-compares -fharden-conditional-branches
+ -fharden-control-flow-redundancy -fhardcfr-skip-leaf
+ -fhardcfr-check-exceptions -fhardcfr-check-returning-calls
+ '-fhardcfr-check-noreturn-calls=*'
# Spectre mitigations, bug #646076
'-mindirect-branch=*'
-mindirect-branch-register