solenv/gbuild/platform/linux.mk | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit fc20b95f3c78f49715b6bb9a322852508e8ff878 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Mon Dec 12 11:04:44 2022 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Wed Jan 17 15:32:54 2024 +0100 lld 16 trunk defaults to --no-undefined-version now ...since <https://github.com/llvm/llvm-project/commit/241dbd310599e3c1a0f1b0c9ced14c8b8760539e> "[ELF] Enable --no-undefined-version by default", causing e.g. > ld.lld: error: version script assignment of 'PRIVATE_1.4' to symbol '_ZN3sal13backtrace_getEm' failed: symbol not defined > ld.lld: error: version script assignment of 'GLIBCXX_3.4' to symbol '_ZNSs4_Rep20_S_empty_rep_storageE' failed: symbol not defined while building Library_sal and > ld.lld: error: version script assignment of 'LIBXML2_2.4.30' to symbol 'xmlXPtrBuildNodeList' failed: symbol not defined > ld.lld: error: version script assignment of 'LIBXML2_2.4.30' to symbol 'xmlXPtrEvalRangePredicate' failed: symbol not defined > ld.lld: error: version script assignment of 'LIBXML2_2.4.30' to symbol 'xmlXPtrFreeLocationSet' failed: symbol not defined [...] while building ExternalProject_libxml2 (and the latter is the reason to add to USE_LD rather than gb_LinkTarget_LDFLAGS, so that this also goes into gb_ExternalProject_get_link_flags). This is only relevant for ELF targets, so at least for now add it to linux.mk rather than the general com_GCC_defs.mk. Change-Id: I2ea227bd9392c406e6c41de61df37ad7fe155c07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143981 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162195 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk index 8fc7d38e3f23..127a5f7b372c 100644 --- a/solenv/gbuild/platform/linux.mk +++ b/solenv/gbuild/platform/linux.mk @@ -15,6 +15,10 @@ endif endif gb_LinkTarget_LDFLAGS += $(gb__LinkTarget_LDFLAGS_zdefs) +ifneq ($(findstring lld,$(USE_LD)),) +USE_LD += -Wl,--undefined-version +endif + include $(GBUILDDIR)/platform/unxgcc.mk ifneq ($(ATOMIC_LIB),)