summaryrefslogtreecommitdiff
path: root/sys-libs/zlib/zlib-1.2.13-r1.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs/zlib/zlib-1.2.13-r1.ebuild')
-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*)
;;