summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-09-23 09:03:49 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-09-23 08:55:32 +0000
commit3a2818280ad65c3d0aa9e720f62fec571713b2e7 (patch)
treec29e451259cbaf94feb224133d684b5e3ae88096 /external
parent7f3395c42dac1b15b3ed7e19d4390bd888e5a7da (diff)
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/29211 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external')
-rw-r--r--external/liblangtag/ExternalProject_langtag.mk2
-rw-r--r--external/liblangtag/langtag-libtool-rpath.patch.011
2 files changed, 12 insertions, 1 deletions
diff --git a/external/liblangtag/ExternalProject_langtag.mk b/external/liblangtag/ExternalProject_langtag.mk
index 6ac51f31081c..5be74fbdeb0c 100644
--- a/external/liblangtag/ExternalProject_langtag.mk
+++ b/external/liblangtag/ExternalProject_langtag.mk
@@ -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 \
diff --git a/external/liblangtag/langtag-libtool-rpath.patch.0 b/external/liblangtag/langtag-libtool-rpath.patch.0
index 905516f7f868..368832b8bb93 100644
--- a/external/liblangtag/langtag-libtool-rpath.patch.0
+++ b/external/liblangtag/langtag-libtool-rpath.patch.0
@@ -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.