commit: c9a4e0ca0ab961af2ef6e73399a22774b15ac0bb Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun May 7 15:29:15 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun May 7 15:59:18 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9a4e0ca
flag-o-matic.eclass: add -O3 to ALLOWED_FLAGS (strip-flags whitelist) -O3 is perfectly safe in the absence of UB. And with UB, -O2 and friends can easily break with new compiler versions and such anyway. In addition, I'd say that -O/-O1 is probably as risky as -O3 nowadays, if not more, because if nothing else, you don't get a bunch of hardening. Signed-off-by: Sam James <sam <AT> gentoo.org> eclass/flag-o-matic.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 6bec3df30881..3dd39c54a531 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -47,7 +47,7 @@ setup-allowed-flags() { # Note: shell globs and character lists are allowed _setup-allowed-flags() { ALLOWED_FLAGS=( - -pipe -O '-O[12sg]' '-mcpu=*' '-march=*' '-mtune=*' + -pipe -O '-O[123sg]' '-mcpu=*' '-march=*' '-mtune=*' # Hardening flags '-fstack-protector*'