Kaydet (Commit) 3a281828 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

external/liblangtag: Tunnel LD_LIBRARY_PATH to where it's actually needed

At least make-4.1-5.fc24.x86_64's /usr/bin/make (indirectly) links against
libfreebl3.so, so it could erroneously pick up our instdir/program/libfreebl3.so
delivered there from external/nss.  But that's a problem for ASan/UBSan builds,
where that libfreebl3.so is instrumented and expects to find certain symbols
exported from the executable (and which /usr/bin/make of course doesn't have),
so running make from within external/liblangtag/ExternalProject_langtag.mk
fails.

Turns out that the only place where LD_LIBRARY_PATH is needed during the build
of external/liblangtag is when running
workdir/UnpackedTarget/langtag/data/reg2xml.

(This is unrelated to the recent changes to external/liblangtag by the way; just
happend to show up now by accident, when doing an incremental build where
external/nss had already been built when external/liblangtag got rebuilt.
external/firebird has a similar problem, but everybody seems to run ASan/UBSan
builds with --disable-firebird-sdbc anyway for now.)

Change-Id: I6e045b6d33a154e350f4640265e6568f96634187
Reviewed-on: https://gerrit.libreoffice.org/29211Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Tested-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 7f3395c4
......@@ -39,8 +39,8 @@ $(call gb_ExternalProject_get_state_target,langtag,build):
REAL_CC="$(shell cygpath -w $(lastword $(filter-out -%,$(CC))))" \
REAL_CC_FLAGS="$(filter -%,$(CC))") \
$(if $(verbose),V=1) \
$(call gb_Helper_extend_ld_path,$(call gb_UnpackedTarball_get_dir,langtag)/liblangtag/.libs) \
$(MAKE) \
LIBO_TUNNEL_LIBRARY_PATH='$(subst ','\'',$(call gb_Helper_extend_ld_path,$(call gb_UnpackedTarball_get_dir,langtag)/liblangtag/.libs))' \
$(if $(filter MACOSX,$(OS)),\
&& $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
$(EXTERNAL_WORKDIR)/liblangtag/.libs/liblangtag.1.dylib \
......
......@@ -10,3 +10,14 @@ Prevent libtool from adding annoying stuff to RPATH
;;
netbsd*)
--- data/Makefile.in
+++ data/Makefile.in
@@ -859,7 +859,7 @@
@CROSS_COMPILING_TRUE@language-subtag-registry.xml: language-subtag-registry reg2xml.c Makefile
@CROSS_COMPILING_TRUE@ @echo Warning: Unable to rebuild $@ when cross-compiling
@CROSS_COMPILING_FALSE@@REBUILD_DATA_TRUE@language-subtag-registry.xml: language-subtag-registry reg2xml$(EXEEXT) Makefile
-@CROSS_COMPILING_FALSE@@REBUILD_DATA_TRUE@ $(AM_V_GEN) $(builddir)/reg2xml$(EXEEXT) $(srcdir)/language-subtag-registry $@.tmp || $(builddir)/reg2xml$(EXEEXT) $(builddir)/language-subtag-registry $@.tmp; \
+@CROSS_COMPILING_FALSE@@REBUILD_DATA_TRUE@ $(AM_V_GEN) $(LIBO_TUNNEL_LIBRARY_PATH) $(builddir)/reg2xml$(EXEEXT) $(srcdir)/language-subtag-registry $@.tmp || $(LIBO_TUNNEL_LIBRARY_PATH) $(builddir)/reg2xml$(EXEEXT) $(builddir)/language-subtag-registry $@.tmp; \
@CROSS_COMPILING_FALSE@@REBUILD_DATA_TRUE@ head -1 $@.tmp | grep -E '^<\?xml version'>/dev/null 2>&1 && mv $@.tmp $@ || (echo "E: $@ isn't an expected result"; rm $@.tmp)
@CROSS_COMPILING_FALSE@@REBUILD_DATA_FALSE@language-subtag-registry.xml:
@CROSS_COMPILING_FALSE@@REBUILD_DATA_FALSE@ @echo Warning: the rebuild of $@ is explicitly disabled.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment