Kaydet (Commit) 785eb0ed authored tarafından Michael Stahl's avatar Michael Stahl

gbuild: try to avoid invoking gdb with LD_LIBRARY_PATH set

Commit b078e0d6 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/29349Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst d77a23f8
......@@ -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) \
......
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