diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-09-27 17:28:03 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-09-29 09:46:44 +0000 |
commit | 785eb0ed14cde731c2795f68f004f0b811cfe387 (patch) | |
tree | e61ef346d838ddd1953270351ddb31ace6e4cd0f /solenv/gbuild | |
parent | d77a23f8bb017024aefa63defbc64b1f7c05cda2 (diff) |
gbuild: try to avoid invoking gdb with LD_LIBRARY_PATH set
Commit b078e0d638514b298616838fae090b8294bac32f introduced the problem
that gdb will load via LD_LIBRARY_PATH the libpython3.5m.so.1.0 from
INSTDIR instead of the one from the system, which makes it unhappy (at
least on Fedora 24).
Try to hack around that by detecting that the user wants to run gdb, and
passing in a command "set environment LD_LIBRARY_PATH ..." so that "run"
inside gdb uses the custom LD_LIBRARY_PATH but gdb itself does not.
Change-Id: I1d29d2af1a77ffab3e718a876c17c29de444c6d9
Reviewed-on: https://gerrit.libreoffice.org/29349
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'solenv/gbuild')
-rw-r--r-- | solenv/gbuild/CppunitTest.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index d82b766512fc..e8cbcc906b00 100644 --- a/solenv/gbuild/CppunitTest.mk +++ b/solenv/gbuild/CppunitTest.mk @@ -29,7 +29,7 @@ gb_CppunitTest_PYTHONDEPS ?= $(call gb_Library_get_target,pyuno_wrapper) $(if $( ifeq ($(strip $(gb_CppunitTest_GDBTRACE)),) ifneq ($(strip $(CPPUNITTRACE)),) -gb_CppunitTest_GDBTRACE := $(CPPUNITTRACE) +gb_CppunitTest_GDBTRACE := $(subst gdb,gdb -ex "set environment $(subst =, ,$(gb_CppunitTest_CPPTESTPRECOMMAND))",$(CPPUNITTRACE)) gb_CppunitTest__interactive := $(true) endif endif @@ -109,7 +109,7 @@ $(call gb_CppunitTest_get_target,%) :| $(gb_CppunitTest_RUNTIMEDEPS) $(if $(gb_CppunitTest__interactive),, \ $(if $(value gb_CppunitTest_postprocess), \ rm -fr $@.core && mkdir $@.core && cd $@.core &&)) \ - ($(gb_CppunitTest_CPPTESTPRECOMMAND) \ + ($(if $(filter gdb,$(CPPUNITTRACE)),,$(gb_CppunitTest_CPPTESTPRECOMMAND)) \ $(if $(G_SLICE),G_SLICE=$(G_SLICE)) \ $(if $(GLIBCXX_FORCE_NEW),GLIBCXX_FORCE_NEW=$(GLIBCXX_FORCE_NEW)) \ $(gb_CppunitTest_malloc_check) \ |