summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWANG Xuerui <xen0n@gentoo.org>2023-01-13 15:24:17 +0800
committerSam James <sam@gentoo.org>2023-01-14 19:14:36 +0000
commit5fe0054b3e6a55983086d25284fd7e7a25506f13 (patch)
tree802bd64c2eecbdd1da528046a4a63c96462fcdf0 /sys-libs/zlib
parentdev-util/makeheaders: drop 0_p4 (diff)
downloadgentoo-5fe0054b3e6a55983086d25284fd7e7a25506f13.tar.gz
gentoo-5fe0054b3e6a55983086d25284fd7e7a25506f13.tar.bz2
gentoo-5fe0054b3e6a55983086d25284fd7e7a25506f13.zip
sys-libs/zlib: fix build with lld-16
Signed-off-by: WANG Xuerui <xen0n@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs/zlib')
-rw-r--r--sys-libs/zlib/zlib-1.2.13-r1.ebuild11
1 files 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*)
;;