commit: 7ca22bfaf0bfcc2ae757213baf363f18bdd47f34
Author: WANG Xuerui <xen0n <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 13 07:28:42 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 14 19:14:37 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ca22bfa
sys-libs/libxcrypt: 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/libxcrypt/libxcrypt-4.4.28-r2.ebuild | 7 +++++++
sys-libs/libxcrypt/libxcrypt-4.4.33.ebuild | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild
b/sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild
index aadddc16912a..4e9c2fb26ca2 100644
--- a/sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild
+++ b/sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild
@@ -129,6 +129,13 @@ src_configure() {
# https://github.com/besser82/libxcrypt/issues/24
filter-lto
+ # 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
+
multibuild_foreach_variant multilib-minimal_src_configure
}
diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.33.ebuild
b/sys-libs/libxcrypt/libxcrypt-4.4.33.ebuild
index a793f41d2d62..b8e357fe4526 100644
--- a/sys-libs/libxcrypt/libxcrypt-4.4.33.ebuild
+++ b/sys-libs/libxcrypt/libxcrypt-4.4.33.ebuild
@@ -131,6 +131,13 @@ src_configure() {
# https://github.com/besser82/libxcrypt/issues/24
filter-lto
+ # 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
+
multibuild_foreach_variant multilib-minimal_src_configure
}