This means that USE=static-libs doesn't produce a "broken" library
when built w/ LTO.

Closes: https://bugs.gentoo.org/592868
Closes: https://bugs.gentoo.org/616106
Closes: https://bugs.gentoo.org/876430
Closes: https://bugs.gentoo.org/924183
Closes: https://bugs.gentoo.org/936172
Closes: https://bugs.gentoo.org/938858
Closes: https://bugs.gentoo.org/940541
Closes: https://bugs.gentoo.org/944291
Closes: https://bugs.gentoo.org/945923
Signed-off-by: Sam James <s...@gentoo.org>
---
 sys-devel/flex/flex-2.6.4-r6.ebuild | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sys-devel/flex/flex-2.6.4-r6.ebuild 
b/sys-devel/flex/flex-2.6.4-r6.ebuild
index 41845f105a3d3..c024ea00fe94c 100644
--- a/sys-devel/flex/flex-2.6.4-r6.ebuild
+++ b/sys-devel/flex/flex-2.6.4-r6.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit flag-o-matic libtool multilib-minimal toolchain-funcs
+inherit dot-a flag-o-matic libtool multilib-minimal toolchain-funcs
 
 DESCRIPTION="The Fast Lexical Analyzer"
 HOMEPAGE="https://github.com/westes/flex";
@@ -53,7 +53,7 @@ src_prepare() {
 
 src_configure() {
        use static && append-ldflags -static
-
+       lto-guarantee-fat
        multilib-minimal_src_configure
 }
 
@@ -86,6 +86,7 @@ multilib_src_install() {
 }
 
 multilib_src_install_all() {
+       strip-lto-bytecode
        einstalldocs
        dodoc ONEWS
        find "${ED}" -name '*.la' -type f -delete || die
-- 
2.49.0


Reply via email to