solenv/gbuild/CppunitTest.mk |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 785eb0ed14cde731c2795f68f004f0b811cfe387
Author: Michael Stahl <mst...@redhat.com>
Date:   Tue Sep 27 17:28:03 2016 +0200

    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 <c...@libreoffice.org>
    Reviewed-by: Michael Stahl <mst...@redhat.com>

diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index d82b766..e8cbcc9 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) \
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to