[Libreoffice-commits] core.git: 2 commits - solenv/gbuild

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 11 10:18:41 UTC 2019


 solenv/gbuild/LinkTarget.mk            |    2 +-
 solenv/gbuild/platform/com_GCC_defs.mk |   12 ++++++------
 solenv/gbuild/platform/com_MSC_defs.mk |    2 ++
 solenv/gbuild/platform/iOS.mk          |    1 +
 solenv/gbuild/platform/solaris.mk      |    5 -----
 solenv/gbuild/platform/unxgcc.mk       |    9 ---------
 6 files changed, 10 insertions(+), 21 deletions(-)

New commits:
commit 65f27f55cbb5994fbabe9716a92ea4d3f20e3e54
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu Apr 4 16:19:54 2019 +0200
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Thu Apr 11 12:18:32 2019 +0200

    --gdb-index flags should be used only when linking with symbols
    
    Change-Id: I32681fd56367c583efc55ab11c0bc59aaf845b86
    Reviewed-on: https://gerrit.libreoffice.org/70367
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 3292c26bcde2..85804ca8bcc5 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -50,7 +50,7 @@ gb_LinkTarget__get_debugflags=$(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(
 # but moreover strip debug from libraries for which debuginfo is not wanted
 # (some libraries reuse .o files from other libraries, notably unittests)
 gb_LinkTarget__get_stripldflags=$(if $(strip $(CFLAGS)$(CXXFLAGS)$(OBJCFLAGS)$(OBJCXXFLAGS)$(LDFLAGS)),,$(gb_LINKERSTRIPDEBUGFLAGS))
-gb_LinkTarget__get_debugldflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),,$(gb_LINKEROPTFLAGS) $(call gb_LinkTarget__get_stripldflags,$(1)))
+gb_LinkTarget__get_debugldflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_DEBUGINFO_FLAGS),$(gb_LINKEROPTFLAGS) $(call gb_LinkTarget__get_stripldflags,$(1)))
 
 # generic cflags/cxxflags to use (optimization flags, debug flags)
 # user supplied CFLAGS/CXXFLAGS override default debug/optimization flags
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index b780358dbe4e..28bb7138d0d7 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -85,12 +85,6 @@ endif
 
 gb_CXXFLAGS_Wundef = -Wno-undef
 
-ifeq ($(ENABLE_GDB_INDEX),TRUE)
-gb_LinkTarget_LDFLAGS += -Wl,--gdb-index
-gb_CFLAGS_COMMON += -ggnu-pubnames
-gb_CXXFLAGS_COMMON += -ggnu-pubnames
-endif
-
 ifeq ($(strip $(gb_GCOV)),YES)
 gb_CFLAGS_COMMON += -fprofile-arcs -ftest-coverage
 gb_CXXFLAGS_COMMON += -fprofile-arcs -ftest-coverage
@@ -199,11 +193,17 @@ gb_DEBUGINFO_FLAGS=-ggdb2
 else
 gb_DEBUGINFO_FLAGS=-g2
 endif
+gb_LINKER_DEBUGINFO_FLAGS=
 
 ifeq ($(HAVE_GCC_SPLIT_DWARF),TRUE)
 gb_DEBUGINFO_FLAGS+=-gsplit-dwarf
 endif
 
+ifeq ($(ENABLE_GDB_INDEX),TRUE)
+gb_LINKER_DEBUGINFO_FLAGS += -Wl,--gdb-index
+gb_DEBUGINFO_FLAGS += -ggnu-pubnames
+endif
+
 gb_LinkTarget_INCLUDE :=\
     $(SOLARINC) \
     -I$(BUILDDIR)/config_$(gb_Side) \
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index 1bb766f91da6..300a047f352d 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -259,6 +259,8 @@ gb_DEBUGINFO_FLAGS := \
 	-FS \
 	-Zi \
 
+gb_LINKER_DEBUGINFO_FLAGS=
+
 gb_COMPILEROPTFLAGS := -O2 -Oy-
 gb_COMPILERNOOPTFLAGS := -Od
 
diff --git a/solenv/gbuild/platform/iOS.mk b/solenv/gbuild/platform/iOS.mk
index 05f7e65781b5..abdeb8cc59e7 100644
--- a/solenv/gbuild/platform/iOS.mk
+++ b/solenv/gbuild/platform/iOS.mk
@@ -30,6 +30,7 @@ include $(GBUILDDIR)/platform/com_GCC_defs.mk
 
 # Use standard lldb debugger
 gb_DEBUGINFO_FLAGS=-g
+gb_LINKER_DEBUGINFO_FLAGS=
 
 # Darwin mktemp -t expects a prefix, not a pattern
 gb_MKTEMP := /usr/bin/mktemp -t gbuild.
commit e7a883994723d7002a92d777734aafefb2d18763
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu Apr 4 15:37:29 2019 +0200
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Thu Apr 11 12:18:20 2019 +0200

    make linker flags conditional when used, not when defined
    
    gb_LINKEROPTFLAGS and gb_LINKERSTRIPDEBUGFLAGS are only used by
    gb_LinkTarget__get_debugldflags, which already properly uses them
    depending on whether debuginfo is wanted or not
    
    Change-Id: I0befc10d6f1ee99ccd49a640241e3ae023454875
    Reviewed-on: https://gerrit.libreoffice.org/70366
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 88fa9413f726..e386601996f2 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -86,12 +86,7 @@ endif
 
 # sun ld doesn't understand -O1 optimize flag
 gb_LINKEROPTFLAGS :=
-
-ifeq ($(gb_SYMBOL),$(true))
-gb_LINKERSTRIPDEBUGFLAGS :=
-else
 gb_LINKERSTRIPDEBUGFLAGS := -Wl,-zredlocsym -Wl,-znoldynsym
-endif
 
 # LinkTarget class
 
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index a84c095721ff..27edd2932589 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -83,17 +83,8 @@ endif
 endif
 endif
 
-ifneq ($(gb_DEBUGLEVEL),0)
-gb_LINKEROPTFLAGS :=
-else
 gb_LINKEROPTFLAGS := -Wl,-O1
-endif
-
-ifeq ($(gb_SYMBOL),$(true))
-gb_LINKERSTRIPDEBUGFLAGS :=
-else
 gb_LINKERSTRIPDEBUGFLAGS := -Wl,-S
-endif
 
 # LinkTarget class
 


More information about the Libreoffice-commits mailing list