summaryrefslogtreecommitdiff
path: root/solenv/gbuild
diff options
context:
space:
mode:
authorDavid Ostrovsky <david@ostrovsky.org>2012-11-03 21:06:49 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-11-23 23:42:39 +0000
commit47cf2c9441d2d73c8626ba42dcbad0331274cf43 (patch)
tree135ba482bc179330638e6fd688bb8113f2b33ca2 /solenv/gbuild
parent80086a82883239cad5a6e667c8ff174623e190a2 (diff)
restore --enable-symbols option
Currently there are 4 different debug options: --enable-dbgutil (the recommended one) --enable-debug --enable-selective-debuginfo --enable-symbols (for advanced users only) In this table the properties of each option is shown: ---------------------------------------- options\properties | O | S | D | T | U | ---------------------------------------- production-code | x | - | - | - | - | ---------------------------------------- --enable-symbols | x | x | - | - | - | ---------------------------------------- --enable-debug | - | x | x | x | - | ---------------------------------------- --enable-dbgutil | - | x | x | x | x | ---------------------------------------- where O: optimization S: debug symbols D: debug STL T: trace facility U: additional debug utility (object counting) Note: --enable-selective-debuginfo has the same properties as --enable-debug Change-Id: Ib8a28c6162f47526d6bb33f81f53835cd11894b2
Diffstat (limited to 'solenv/gbuild')
-rw-r--r--solenv/gbuild/gbuild.help.txt2
-rw-r--r--solenv/gbuild/gbuild.mk8
-rw-r--r--solenv/gbuild/platform/IOS_ARM_GCC.mk7
-rw-r--r--solenv/gbuild/platform/WNT_INTEL_GCC.mk6
-rw-r--r--solenv/gbuild/platform/com_MSC_defs.mk5
-rw-r--r--solenv/gbuild/platform/macosx.mk7
-rw-r--r--solenv/gbuild/platform/solaris.mk5
-rw-r--r--solenv/gbuild/platform/unxgcc.mk9
8 files changed, 48 insertions, 1 deletions
diff --git a/solenv/gbuild/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt
index 0b1e9ca924f7..83b4550d9b93 100644
--- a/solenv/gbuild/gbuild.help.txt
+++ b/solenv/gbuild/gbuild.help.txt
@@ -49,6 +49,8 @@ AVAILABLE TARGETS
INTERACTIVE VARIABLES:
DEBUG / debug If not empty, build as with --enable-debug.
+ ENABLE_SYMBOLS / enable_symbols
+ If not empty, build as with --enable-symbols.
DBGLEVEL / dbglevel
If not empty, force the debug level to the specified value. The
debug level is passed to the source code through OSL_DEBUG_LEVEL
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 5fd7b308ce04..1d1e304c578e 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -124,6 +124,14 @@ ENABLE_DEBUGINFO_FOR := all
endif
endif
+ifeq ($(or $(ENABLE_SYMBOLS),$(enable_symbols)),FALSE)
+gb_SYMBOL := $(false)
+else
+ifneq ($(strip $(ENABLE_SYMBOLS)$(enable_symbols)),)
+gb_SYMBOL := $(true)
+endif
+endif
+
ifneq ($(nodep),)
gb_FULLDEPS := $(false)
else
diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk
index 5ef325b896f8..bd617e4a31dd 100644
--- a/solenv/gbuild/platform/IOS_ARM_GCC.mk
+++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk
@@ -132,6 +132,13 @@ gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
gb_LinkTarget_OBJCXXFLAGS := $(gb_CXXFLAGS) $(gb_OBJCXXFLAGS)
gb_LinkTarget_OBJCFLAGS := $(gb_CFLAGS) $(gb_OBJCFLAGS)
+ifeq ($(gb_SYMBOL),$(true))
+gb_LinkTarget_CFLAGS += $(gb_DEBUG_CFLAGS)
+gb_LinkTarget_CXXFLAGS += $(gb_DEBUG_CFLAGS)
+gb_LinkTarget_OBJCXXFLAGS += $(gb_DEBUG_CFLAGS)
+gb_LinkTarget_OBJCFLAGS += $(gb_DEBUG_CFLAGS)
+endif
+
define gb_LinkTarget__get_liblinkflags
$(patsubst lib%.a,-l%,$(foreach lib,$(filter-out $(gb_Library_UNOLIBS_OOO),$(1)),$(call gb_Library_get_filename,$(lib)))) \
$(foreach lib,$(filter $(gb_Library_UNOLIBS_OOO),$(1)),$(SOLARVER)/$(INPATH)/lib/$(lib)$(gb_Library_UNOEXT))
diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
index f1e7d28a942c..123a7967f2f2 100644
--- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
@@ -111,13 +111,17 @@ gb_STDLIBS := \
-lmingw32 \
-lmingwex \
+gb_DEBUG_CFLAGS := -g -fno-inline
# LinkTarget class
gb_LinkTarget_CFLAGS := $(gb_CFLAGS)
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
-gb_DEBUG_CFLAGS := -g -fno-inline
+ifeq ($(gb_SYMBOL),$(true))
+gb_LinkTarget_CXXFLAGS += $(GGDB2)
+gb_LinkTarget_CFLAGS += $(GGDB2)
+endif
gb_LinkTarget_INCLUDE +=\
$(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index dc2c9833f5e4..aca825cba84e 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -217,6 +217,11 @@ gb_CFLAGS+=-Zi
gb_CXXFLAGS+=-Zi
endif
+ifeq ($(gb_SYMBOL),$(true))
+gb_CFLAGS+=$(gb_DEBUG_CFLAGS)
+gb_CXXFLAGS+=$(gb_DEBUG_CFLAGS)
+endif
+
gb_COMPILEROPTFLAGS := -Ob1 -Oxs -Oy-
gb_COMPILERNOOPTFLAGS := -Od
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index f6a75b6d8c96..2515b4546ef8 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -165,6 +165,13 @@ gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
gb_LinkTarget_OBJCXXFLAGS := $(gb_CXXFLAGS) $(gb_OBJCXXFLAGS)
gb_LinkTarget_OBJCFLAGS := $(gb_CFLAGS) $(gb_OBJCFLAGS)
+ifeq ($(gb_SYMBOL),$(true))
+gb_LinkTarget_CFLAGS += $(gb_DEBUG_CFLAGS)
+gb_LinkTarget_CXXFLAGS += $(gb_DEBUG_CFLAGS)
+gb_LinkTarget_OBJCFLAGS += $(gb_DEBUG_CFLAGS)
+gb_LinkTarget_OBJCXXFLAGS += $(gb_DEBUG_CFLAGS)
+endif
+
define gb_LinkTarget__get_layer
$(if $(filter Executable,$(1)),\
$$(call gb_Executable_get_layer,$(2)),\
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 52c7a0f49b09..2768fc50d867 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -179,6 +179,11 @@ gb_LinkTarget__RPATHS := \
gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR)
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
+ifeq ($(gb_SYMBOL),$(true))
+gb_LinkTarget_CXXFLAGS += -ggdb2
+gb_LinkTarget_CFLAGS += -ggdb2
+endif
+
# note that `cat $(extraobjectlist)` is needed to build with older gcc versions, e.g. 4.1.2 on SLED10
# we want to use @$(extraobjectlist) in the long run
define gb_LinkTarget__command_dynamiclink
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 87e57a8a556e..dbd00a1744c4 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -161,7 +161,11 @@ endif
gb_COMPILERNOOPTFLAGS := -O0
+ifeq ($(gb_SYMBOL),$(true))
+gb_LINKERSTRIPDEBUGFLAGS :=
+else
gb_LINKERSTRIPDEBUGFLAGS := -Wl,-S
+endif
# LinkTarget class
@@ -180,6 +184,11 @@ gb_LinkTarget__RPATHS := \
gb_LinkTarget_CFLAGS := $(gb_CFLAGS)
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
+ifeq ($(gb_SYMBOL),$(true))
+gb_LinkTarget_CXXFLAGS += $(GGDB2)
+gb_LinkTarget_CFLAGS += $(GGDB2)
+endif
+
# note that `cat $(extraobjectlist)` is needed to build with older gcc versions, e.g. 4.1.2 on SLED10
# we want to use @$(extraobjectlist) in the long run
define gb_LinkTarget__command_dynamiclink