commit: 5fe0054b3e6a55983086d25284fd7e7a25506f13
Author: WANG Xuerui <xen0n <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 13 07:24:17 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 14 19:14:36 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fe0054b
sys-libs/zlib: fix build with lld-16
Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-libs/zlib/zlib-1.2.13-r1.ebuild | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/sys-libs/zlib/zlib-1.2.13-r1.ebuild
b/sys-libs/zlib/zlib-1.2.13-r1.ebuild
index 50b767a0ef31..30d4a7c1a33e 100644
--- a/sys-libs/zlib/zlib-1.2.13-r1.ebuild
+++ b/sys-libs/zlib/zlib-1.2.13-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 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="${BROOT}"/usr/share/openpgp-keys/madler.asc
-inherit autotools multilib-minimal flag-o-matic usr-ldscript verify-sig
+inherit autotools multilib-minimal flag-o-matic toolchain-funcs usr-ldscript
verify-sig
CYGWINPATCHES=(
"https://github.com/cygwinports/zlib/raw/22a3462cae33a82ad966ea0a7d6cbe8fc1368fec/1.2.11-gzopen_w.patch
-> ${PN}-1.2.11-cygwin-gzopen_w.patch"
@@ -92,6 +92,13 @@ multilib_src_configure() {
# because it would pass it even for older binutils.
use sparc && append-flags $(test-flags-CCLD -Wl,--no-warn-rwx-segments)
+ # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+ # https://github.com/gentoo/gentoo/pull/28355
+ # mold needs this too but right now tc-ld-is-mold is also not available
+ if tc-ld-is-lld; then
+ append-ldflags -Wl,--undefined-version
+ fi
+
case ${CHOST} in
*-mingw*|mingw*|*-cygwin*)
;;