diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-12-12 11:04:44 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2024-01-17 15:32:54 +0100 |
commit | fc20b95f3c78f49715b6bb9a322852508e8ff878 (patch) | |
tree | 413eb63d5b33c4f531aa4ac3b374bd133cb1743f | |
parent | 04918259b55f97c338e95bf9a28f0279ef2168ae (diff) |
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 <sbergman@redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162195
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r-- | solenv/gbuild/platform/linux.mk | 4 |
1 files changed, 4 insertions, 0 deletions
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),) |