summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWANG Xuerui <xen0n@gentoo.org>2023-01-14 14:34:46 +0800
committerSam James <sam@gentoo.org>2023-01-14 19:14:39 +0000
commit90e12deb36f9e585f350076570e464497b9547eb (patch)
treef08f91dbb028c24f403f096e4e6b9851c4878361 /dev-libs
parentdev-libs/popt: fix build with lld-16 (diff)
downloadgentoo-90e12deb36f9e585f350076570e464497b9547eb.tar.gz
gentoo-90e12deb36f9e585f350076570e464497b9547eb.tar.bz2
gentoo-90e12deb36f9e585f350076570e464497b9547eb.zip
dev-libs/libxml2: fix build with lld-16
Signed-off-by: WANG Xuerui <xen0n@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/libxml2/libxml2-2.10.3-r1.ebuild9
-rw-r--r--dev-libs/libxml2/libxml2-9999.ebuild9
2 files changed, 16 insertions, 2 deletions
diff --git a/dev-libs/libxml2/libxml2-2.10.3-r1.ebuild b/dev-libs/libxml2/libxml2-2.10.3-r1.ebuild
index 3430b84072a1..4b5648cf6460 100644
--- a/dev-libs/libxml2/libxml2-2.10.3-r1.ebuild
+++ b/dev-libs/libxml2/libxml2-2.10.3-r1.ebuild
@@ -7,7 +7,7 @@ EAPI=8
PYTHON_COMPAT=( python3_{9..11} )
PYTHON_REQ_USE="xml(+)"
-inherit flag-o-matic python-r1 multilib-minimal
+inherit flag-o-matic python-r1 multilib-minimal toolchain-funcs
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
XSTS_NAME_1="xmlschema2002-01-16"
@@ -102,6 +102,13 @@ multilib_src_configure() {
# Filter seemingly problematic CFLAGS (bug #26320)
filter-flags -fprefetch-loop-arrays -funroll-loops
+ # 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
+
# Notes:
# The meaning of the 'debug' USE flag does not apply to the --with-debug
# switch (enabling the libxml2 debug module). See bug #100898.
diff --git a/dev-libs/libxml2/libxml2-9999.ebuild b/dev-libs/libxml2/libxml2-9999.ebuild
index c5e2199726d3..556f5e715652 100644
--- a/dev-libs/libxml2/libxml2-9999.ebuild
+++ b/dev-libs/libxml2/libxml2-9999.ebuild
@@ -7,7 +7,7 @@ EAPI=8
PYTHON_COMPAT=( python3_{9..11} )
PYTHON_REQ_USE="xml(+)"
-inherit flag-o-matic python-r1 multilib-minimal
+inherit flag-o-matic python-r1 multilib-minimal toolchain-funcs
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
XSTS_NAME_1="xmlschema2002-01-16"
@@ -100,6 +100,13 @@ multilib_src_configure() {
# Filter seemingly problematic CFLAGS (bug #26320)
filter-flags -fprefetch-loop-arrays -funroll-loops
+ # 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
+
# Notes:
# The meaning of the 'debug' USE flag does not apply to the --with-debug
# switch (enabling the libxml2 debug module). See bug #100898.