From: Sam James <sam@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: Sam James <sam@gentoo.org>
Subject: [gentoo-dev] [PATCH 2/5] sys-libs/zlib: use dot-a.eclass for LTO
Date: Fri, 2 May 2025 21:13:43 +0100 [thread overview]
Message-ID: <065a0b26f0ef75a2fe0413de9130b28984bf330d.1746216824.git.sam@gentoo.org> (raw)
In-Reply-To: <cover.1746216820.git.sam@gentoo.org>
This means that USE=static-libs doesn't produce a "broken" library
when built w/ LTO.
Signed-off-by: Sam James <sam@gentoo.org>
---
sys-libs/zlib/zlib-1.3.1-r1.ebuild | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/sys-libs/zlib/zlib-1.3.1-r1.ebuild b/sys-libs/zlib/zlib-1.3.1-r1.ebuild
index f81cf5fac8d68..837b8564eec1b 100644
--- a/sys-libs/zlib/zlib-1.3.1-r1.ebuild
+++ b/sys-libs/zlib/zlib-1.3.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -6,7 +6,7 @@ EAPI=8
# Worth keeping an eye on 'develop' branch upstream for possible backports.
AUTOTOOLS_AUTO_DEPEND="no"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/madler.asc
-inherit autotools edo multilib-minimal flag-o-matic verify-sig
+inherit autotools dot-a edo multilib-minimal flag-o-matic verify-sig
DESCRIPTION="Standard (de)compression library"
HOMEPAGE="https://zlib.net/"
@@ -68,6 +68,11 @@ src_prepare() {
esac
}
+src_configure() {
+ lto-guarantee-fat
+ multilib-minimal_src_configure
+}
+
multilib_src_configure() {
# We pass manually instead of relying on the configure script/makefile
# because it would pass it even for older binutils.
@@ -164,6 +169,8 @@ multilib_src_install() {
}
multilib_src_install_all() {
+ strip-lto-bytecode
+
dodoc FAQ README ChangeLog doc/*.txt
if use minizip ; then
--
2.49.0
next prev parent reply other threads:[~2025-05-02 20:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-02 20:13 [gentoo-dev] [PATCH 0/5] Handle LTO with static libraries Sam James
2025-05-02 20:13 ` [gentoo-dev] [PATCH 1/5] dot-a.eclass: new eclass for handling LTO in static archives Sam James
2025-05-03 4:27 ` Michał Górny
2025-05-03 6:22 ` Sam James
2025-05-03 6:44 ` Sam James
2025-05-03 7:18 ` Sam James
2025-05-02 20:13 ` Sam James [this message]
2025-05-02 20:13 ` [gentoo-dev] [PATCH 3/5] dev-libs/glib: use dot-a.eclass for LTO Sam James
2025-05-02 20:13 ` [gentoo-dev] [PATCH 4/5] dev-util/sysprof-capture: " Sam James
2025-05-02 20:13 ` [gentoo-dev] [PATCH 5/5] sys-devel/flex: " Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=065a0b26f0ef75a2fe0413de9130b28984bf330d.1746216824.git.sam@gentoo.org \
--to=sam@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox