From a13d692939efda7afb29c1d8a2cb1d5717972b89 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 6 May 2025 11:53:40 -0400 Subject: [PATCH] flag-o-matic.eclass: allow -ffat-lto-objects in strip-flags This flag is "safe" for the same reason `-flto` is "safe". Furthermore, the new dot-a.eclass relies on setting this flag, which `strip-flags` then deletes again in the event that a package uses both `lto-guarantee-fat` and `strip-flags`. End result: static libraries that contain neither LTO nor regular object code. Example package that does this: dev-libs/nss Acked-by: Sam James Signed-off-by: Eli Schwartz --- 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 85274c91121f2..f22854c646c7f 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -46,7 +46,7 @@ setup-allowed-flags() { _setup-allowed-flags() { ALLOWED_FLAGS=( -pipe -O '-O[123szg]' '-mcpu=*' '-march=*' '-mtune=*' '-mfpmath=*' - -flto '-flto=*' -fno-lto + -flto '-flto=*' -fno-lto -ffat-lto-objects # Hardening flags '-fstack-protector*'