summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--external/gpgmepp/UnpackedTarball_gpgmepp.mk1
-rw-r--r--external/gpgmepp/asan.patch14
-rw-r--r--solenv/gbuild/CppunitTest.mk2
-rw-r--r--xmlsecurity/CppunitTest_xmlsecurity_signing.mk8
4 files changed, 24 insertions, 1 deletions
diff --git a/external/gpgmepp/UnpackedTarball_gpgmepp.mk b/external/gpgmepp/UnpackedTarball_gpgmepp.mk
index bcddcca1a218..931d163d7576 100644
--- a/external/gpgmepp/UnpackedTarball_gpgmepp.mk
+++ b/external/gpgmepp/UnpackedTarball_gpgmepp.mk
@@ -23,5 +23,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,gpgmepp, \
$(if $(filter MSC,$(COM)),external/gpgmepp/w32-fix-libtool.patch.1) \
$(if $(filter MSC,$(COM)),external/gpgmepp/w32-add-initializer.patch.1) \
external/gpgmepp/w32-build-fixes-2.patch \
+ $(if $(ENABLE_RUNTIME_OPTIMIZATIONS),,external/gpgmepp/asan.patch) \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/gpgmepp/asan.patch b/external/gpgmepp/asan.patch
new file mode 100644
index 000000000000..526da3336504
--- /dev/null
+++ b/external/gpgmepp/asan.patch
@@ -0,0 +1,14 @@
+--- src/posix-io.c
++++ src/posix-io.c
+@@ -468,6 +468,11 @@
+
+ if (atfork)
+ atfork (atforkvalue, 0);
++ char const * ld_path = getenv("LIBO_LD_PATH");
++ if (!ld_path)
++ abort();
++ if (setenv("LD_LIBRARY_PATH", ld_path, 1) != 0)
++ abort();
+
+ /* First close all fds which will not be inherited. If we
+ * have closefrom(2) we first figure out the highest fd we
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 310d39ea61bb..45af5c9b25a7 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -125,13 +125,13 @@ else
( \
$(if $(gb_CppunitTest_localized),for l in $(WITH_LANG_LIST) ; do LO_TEST_LOCALE="$$l" ) \
$(if $(gb_CppunitTest_PREGDBTRACE),$(gb_CppunitTest_PREGDBTRACE) &&) \
+ $(EXTRA_ENV_VARS) \
$(if $(filter gdb,$(gb_CppunitTest_GDBTRACE)),,$(gb_CppunitTest_CPPTESTPRECOMMAND)) \
$(if $(G_SLICE),G_SLICE=$(G_SLICE)) \
$(if $(GLIBCXX_FORCE_NEW),GLIBCXX_FORCE_NEW=$(GLIBCXX_FORCE_NEW)) \
$(gb_CppunitTest_malloc_check) \
$(if $(strip $(PYTHON_URE)),\
PYTHONDONTWRITEBYTECODE=1) \
- $(EXTRA_ENV_VARS) \
$(ICECREAM_RUN) $(gb_CppunitTest_GDBTRACE) $(gb_CppunitTest_VALGRINDTOOL) $(gb_CppunitTest_CPPTESTCOMMAND) \
$(call gb_LinkTarget_get_target,$(call gb_CppunitTest_get_linktarget,$*)) \
$(call gb_CppunitTest__make_args) "-env:CPPUNITTESTTARGET=$@" \
diff --git a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
index e39e5c085bac..bad092e6675b 100644
--- a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
+++ b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
@@ -52,4 +52,12 @@ ifeq ($(ENABLE_PDFIMPORT),TRUE)
$(eval $(call gb_CppunitTest_use_executable,xmlsecurity_signing,xpdfimport))
endif
+ifeq ($(ENABLE_RUNTIME_OPTIMIZATIONS),)
+ifeq ($(OS),LINUX)
+$(call gb_CppunitTest_get_target,xmlsecurity_signing): \
+ EXTRA_ENV_VARS := \
+ LIBO_LD_PATH=$$LD_LIBRARY_PATH
+endif
+endif
+
# vim: set noet sw=4 ts=4: