[Libreoffice-commits] core.git: config_host.mk.in configure.ac solenv/gbuild

Luboš Luňák l.lunak at collabora.com
Wed Jul 4 13:36:22 UTC 2018


 config_host.mk.in                      |    1 +
 configure.ac                           |   22 ++++++++++++++++++++++
 solenv/gbuild/LinkTarget.mk            |    9 +++++++++
 solenv/gbuild/TargetLocations.mk       |    9 +++++++++
 solenv/gbuild/platform/com_GCC_defs.mk |    4 ++++
 5 files changed, 45 insertions(+)

New commits:
commit 0654030f98355f105ddc741147fc0ff03ab0d906
Author: Luboš Luňák <l.lunak at collabora.com>
Date:   Thu Jun 21 15:37:25 2018 +0200

    add --enable-split-debug for -gsplit-dwarf
    
    https://lists.freedesktop.org/archives/libreoffice/2018-June/080437.html
    
    Change-Id: I2a02e23e46d7a54083249408f09fba87932b1d44
    Reviewed-on: https://gerrit.libreoffice.org/56416
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/config_host.mk.in b/config_host.mk.in
index c104f07cb1eb..acca001c0bcd 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -248,6 +248,7 @@ export HAVE_GCC_FNO_ENFORCE_EH_SPECS=@HAVE_GCC_FNO_ENFORCE_EH_SPECS@
 export HAVE_GCC_FNO_INLINE=@HAVE_GCC_FNO_INLINE@
 export HAVE_GCC_FNO_SIZED_DEALLOCATION=@HAVE_GCC_FNO_SIZED_DEALLOCATION@
 export HAVE_GCC_GGDB2=@HAVE_GCC_GGDB2@
+export HAVE_GCC_SPLIT_DWARF=@HAVE_GCC_SPLIT_DWARF@
 export HAVE_GNUMAKE_FILE_FUNC=@HAVE_GNUMAKE_FILE_FUNC@
 export HAVE_GPGCONF_SOCKETDIR=@HAVE_GPGCONF_SOCKETDIR@
 export HAVE_LD_BSYMBOLIC_FUNCTIONS=@HAVE_LD_BSYMBOLIC_FUNCTIONS@
diff --git a/configure.ac b/configure.ac
index c8d18b18fde8..12516d80219b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1116,6 +1116,11 @@ libo_FUZZ_ARG_ENABLE(debug,
         [Include debugging information, disable compiler optimization and inlining plus
          extra debugging code like assertions. Extra large build! (enables -g compiler flag).]))
 
+libo_FUZZ_ARG_ENABLE(split-debug,
+    AS_HELP_STRING([--enable-split-debug],
+        [Uses split debug information (-gsplit-dwarf compile flag). Saves disk space and build time,
+         but requires tools that support it (both build tools and debuggers).]))
+
 libo_FUZZ_ARG_ENABLE(sal-log,
     AS_HELP_STRING([--enable-sal-log],
         [Make SAL_INFO and SAL_WARN calls do something even in a non-debug build.]))
@@ -3864,6 +3869,23 @@ else
 fi
 AC_SUBST(ENABLE_DEBUG)
 
+if test "$enable_split_debug" = yes; then
+    HAVE_GSPLIT_DWARF=
+    if test "$GCC" = "yes"; then
+        AC_MSG_CHECKING([whether $CC supports -gsplit-dwarf])
+        save_CFLAGS=$CFLAGS
+        CFLAGS="$CFLAGS -Werror -gsplit-dwarf"
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_SPLIT_DWARF=TRUE ],[])
+        CFLAGS=$save_CFLAGS
+        if test "$HAVE_GCC_SPLIT_DWARF" = "TRUE"; then
+            AC_MSG_RESULT([yes])
+        else
+            AC_MSG_RESULT([no])
+        fi
+    fi
+    AC_SUBST(HAVE_GCC_SPLIT_DWARF)
+fi
+
 if test "$enable_sal_log" = yes; then
     ENABLE_SAL_LOG=TRUE
 fi
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index cbc9499d6eb8..add0655498b0 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -543,22 +543,31 @@ $(WORKDIR)/Clean/LinkTarget/% :
 	RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),200,\
 		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
 		$(foreach object,$(COBJECTS),$(call gb_CObject_get_dep_target,$(object))) \
+		$(foreach object,$(COBJECTS),$(call gb_CObject_get_dwo_target,$(object))) \
 		$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
 		$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_dep_target,$(object))) \
+		$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_dwo_target,$(object))) \
 		$(foreach object,$(OBJCOBJECTS),$(call gb_ObjCObject_get_target,$(object))) \
 		$(foreach object,$(OBJCOBJECTS),$(call gb_ObjCObject_get_dep_target,$(object))) \
+		$(foreach object,$(OBJCOBJECTS),$(call gb_ObjCObject_get_dwo_target,$(object))) \
 		$(foreach object,$(OBJCXXOBJECTS),$(call gb_ObjCxxObject_get_target,$(object))) \
 		$(foreach object,$(OBJCXXOBJECTS),$(call gb_ObjCxxObject_get_dep_target,$(object))) \
+		$(foreach object,$(OBJCXXOBJECTS),$(call gb_ObjCxxObject_get_dwo_target,$(object))) \
 		$(foreach object,$(CXXCLROBJECTS),$(call gb_CxxClrObject_get_target,$(object))) \
 		$(foreach object,$(CXXCLROBJECTS),$(call gb_CxxClrObject_get_dep_target,$(object))) \
+		$(foreach object,$(CXXCLROBJECTS),$(call gb_CxxClrObject_get_dwo_target,$(object))) \
 		$(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \
 		$(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_dep_target,$(object))) \
+		$(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_dwo_target,$(object))) \
 		$(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \
 		$(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_dep_target,$(object))) \
+		$(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_dwo_target,$(object))) \
 		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
 		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_dep_target,$(object))) \
+		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_dwo_target,$(object))) \
 		$(foreach object,$(GENCXXCLROBJECTS),$(call gb_GenCxxClrObject_get_target,$(object))) \
 		$(foreach object,$(GENCXXCLROBJECTS),$(call gb_GenCxxClrObject_get_dep_target,$(object))) \
+		$(foreach object,$(GENCXXCLROBJECTS),$(call gb_GenCxxClrObject_get_dwo_target,$(object))) \
 		$(call gb_LinkTarget_get_target,$(LINKTARGET)) \
 		$(call gb_LinkTarget_get_dep_target,$(LINKTARGET)) \
 		$(call gb_LinkTarget_get_headers_target,$(LINKTARGET)) \
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index 7f658d9c608c..a2e51cbd0447 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -38,8 +38,11 @@ gb_AllLangHelp_get_helpfiles_target = $(WORKDIR)/AllLangHelp/$(1).helpfiles
 gb_AllLangPackage_get_target = $(WORKDIR)/AllLangPackage/$(1)
 gb_AllLangMoTarget_get_target = $(WORKDIR)/AllLangMo/$(1)
 gb_AsmObject_get_target = $(WORKDIR)/AsmObject/$(1).o
+gb_AsmObject_get_dwo_target = $(WORKDIR)/AsmObject/$(1).dwo
 gb_CObject_get_target = $(WORKDIR)/CObject/$(1).o
+gb_CObject_get_dwo_target = $(WORKDIR)/CObject/$(1).dwo
 gb_GenCObject_get_target = $(WORKDIR)/GenCObject/$(1).o
+gb_GenCObject_get_dwo_target = $(WORKDIR)/GenCObject/$(1).dwo
 gb_CliAssembly_get_target = $(WORKDIR)/CliAssembly/$(1).done
 gb_CliAssemblyTarget_get_target = $(WORKDIR)/CliAssemblyTarget/$(1).done
 gb_CliAssemblyTarget_get_assembly_target = $(WORKDIR)/CliAssemblyTarget/$(1)$(gb_CliAssemblyTarget_POLICYEXT)
@@ -57,7 +60,9 @@ gb_CustomTarget_get_workdir = $(WORKDIR)/CustomTarget/$(1)
 gb_DescriptionTranslateTarget_get_target = $(WORKDIR)/DescriptionTranslateTarget/$(1).xml
 gb_Dictionary_get_target = $(WORKDIR)/Dictionary/$(1).done
 gb_CxxObject_get_target = $(WORKDIR)/CxxObject/$(1).o
+gb_CxxObject_get_dwo_target = $(WORKDIR)/CxxObject/$(1).dwo
 gb_GenCxxObject_get_target = $(WORKDIR)/GenCxxObject/$(1).o
+gb_GenCxxObject_get_dwo_target = $(WORKDIR)/GenCxxObject/$(1).dwo
 gb_Executable_get_headers_target = $(WORKDIR)/Headers/Executable/$(1)
 gb_Executable_get_runtime_target = $(WORKDIR_FOR_BUILD)/Executable/$(1).run
 gb_Extension_get_target = $(WORKDIR)/Extension/$(1).oxt
@@ -127,9 +132,13 @@ gb_Module_get_perfcheck_target = $(WORKDIR)/Module/perfcheck/$(1)
 gb_Module_get_uicheck_target = $(WORKDIR)/Module/uicheck/$(1)
 gb_Module_get_target = $(WORKDIR)/Module/$(1)
 gb_ObjCxxObject_get_target = $(WORKDIR)/ObjCxxObject/$(1).o
+gb_ObjCxxObject_get_dwo_target = $(WORKDIR)/ObjCxxObject/$(1).dwo
 gb_ObjCObject_get_target = $(WORKDIR)/ObjCObject/$(1).o
+gb_ObjCObject_get_dwo_target = $(WORKDIR)/ObjCObject/$(1).dwo
 gb_CxxClrObject_get_target = $(WORKDIR)/CxxClrObject/$(1).o
+gb_CxxClrObject_get_dwo_target = $(WORKDIR)/CxxClrObject/$(1).dwo
 gb_GenCxxClrObject_get_target = $(WORKDIR)/GenCxxClrObject/$(1).o
+gb_GenCxxClrObject_get_dwo_target = $(WORKDIR)/GenCxxClrObject/$(1).dwo
 gb_Pagein_get_target = $(WORKDIR)/Pagein/pagein-$(1)
 gb_Package_get_preparation_target = $(WORKDIR)/Package/prepared/$(1)
 gb_Package_get_target = $(WORKDIR)/Package/$(1).filelist
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 64068b3ffd2c..da9440cfeb3d 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -188,6 +188,10 @@ else
 gb_DEBUGINFO_FLAGS=-g2
 endif
 
+ifeq ($(HAVE_GCC_SPLIT_DWARF),TRUE)
+gb_DEBUGINFO_FLAGS+=-gsplit-dwarf
+endif
+
 ifeq ($(HAVE_GCC_FINLINE_LIMIT),TRUE)
 FINLINE_LIMIT0=-finline-limit=0
 endif


More information about the Libreoffice-commits mailing list