[Libreoffice-commits] .: config_host.mk.in configure.ac solenv/gbuild
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Nov 23 15:43:01 PST 2012
config_host.mk.in | 1
configure.ac | 39 +++++++++++++++++++++++++++-----
solenv/gbuild/gbuild.help.txt | 2 +
solenv/gbuild/gbuild.mk | 8 ++++++
solenv/gbuild/platform/IOS_ARM_GCC.mk | 7 +++++
solenv/gbuild/platform/WNT_INTEL_GCC.mk | 6 ++++
solenv/gbuild/platform/com_MSC_defs.mk | 5 ++++
solenv/gbuild/platform/macosx.mk | 7 +++++
solenv/gbuild/platform/solaris.mk | 5 ++++
solenv/gbuild/platform/unxgcc.mk | 9 +++++++
10 files changed, 82 insertions(+), 7 deletions(-)
New commits:
commit 47cf2c9441d2d73c8626ba42dcbad0331274cf43
Author: David Ostrovsky <david at ostrovsky.org>
Date: Sat Nov 3 21:06:49 2012 +0100
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
diff --git a/config_host.mk.in b/config_host.mk.in
index 52d9850..fdb3c33 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -176,6 +176,7 @@ export ENABLE_SCRIPTING_BEANSHELL=@ENABLE_SCRIPTING_BEANSHELL@
export ENABLE_SCRIPTING_JAVASCRIPT=@ENABLE_SCRIPTING_JAVASCRIPT@
export ENABLE_SCRIPTING_PYTHON=@ENABLE_SCRIPTING_PYTHON@
export ENABLE_SILENT_MSI=@ENABLE_SILENT_MSI@
+export ENABLE_SYMBOLS=@ENABLE_SYMBOLS@
export ENABLE_SYSTRAY_GTK=@ENABLE_SYSTRAY_GTK@
export ENABLE_TELEPATHY=@ENABLE_TELEPATHY@
export ENABLE_ZENITY=@ENABLE_ZENITY@
diff --git a/configure.ac b/configure.ac
index b9c4d16..add46ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -757,12 +757,6 @@ AC_ARG_ENABLE(assert-always-abort,
[make assert() abort even in release code.]),
,)
-AC_ARG_ENABLE(debug,
- AS_HELP_STRING([--enable-debug],
- [Include debugging information, disable compiler optimization and inlining plus
- extra debugging code like assertions. Extra large build! (enables -g compiler flag
- and dmake debug=true).]))
-
AC_ARG_ENABLE(dbgutil,
AS_HELP_STRING([--enable-dbgutil],
[Provide debugging support from --enable-debug and include additional debugging
@@ -771,6 +765,12 @@ AC_ARG_ENABLE(dbgutil,
Note that this makes the build ABI incompatible, it is not possible to mix object
files or libraries from a --enable-dbgutil and a --disable-dbgutil build.]))
+AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug],
+ [Include debugging information, disable compiler optimization and inlining plus
+ extra debugging code like assertions. Extra large build! (enables -g compiler flag
+ and dmake debug=true).]))
+
AC_ARG_ENABLE(selective-debuginfo,
AS_HELP_STRING([--enable-selective-debuginfo],
[If --enable-debug or --enable-dbgutil is used, build debugging information
@@ -780,6 +780,12 @@ AC_ARG_ENABLE(selective-debuginfo,
more general, and disabling takes precedence).
Example: --enable-selective-debuginfo="all -sw/ -Library_sc".]))
+AC_ARG_ENABLE(symbols,
+ AS_HELP_STRING([--enable-symbols],
+ [Include debugging symbols in output while preserve optimization.
+ This enables -g compiler flag for GCC or equivalent,
+ without changing anything else compared to productive code.]))
+
AC_ARG_ENABLE(compiler-plugins,
AS_HELP_STRING([--enable-compiler-plugins],
[Enable compiler plugins that will perform additional checks during
@@ -3351,6 +3357,27 @@ if test -n "$ENABLE_DEBUG"; then
fi
AC_SUBST(ENABLE_DEBUGINFO_FOR)
+dnl Check for enable symbols option
+dnl ===================================================================
+AC_MSG_CHECKING([whether to include symbols while preserve optimization])
+if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then
+ ENABLE_SYMBOLS="TRUE"
+ if test -n "$ENABLE_DBGUTIL"; then
+ AC_MSG_ERROR([--enable-dbgutil cannot be used with --enable-symbols])
+ elif test -n "$ENABLE_DEBUG"; then
+ AC_MSG_ERROR([--enable-debug cannot be used with --enable-symbols])
+ fi
+ AC_MSG_RESULT([yes])
+else
+ if test -n "$enable_symbols" -a "$enable_symbols" = "no"; then
+ ENABLE_SYMBOLS="FALSE"
+ else
+ ENABLE_SYMBOLS=
+ fi
+ AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_SYMBOLS)
+
dnl Check for explicit C/CXX/OBJC/OBJCXX/LDFLAGS. We by default use the ones specified
dnl by our build system, but explicit override is possible.
AC_MSG_CHECKING(for explicit CFLAGS)
diff --git a/solenv/gbuild/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt
index 0b1e9ca..83b4550 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 5fd7b30..1d1e304 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 5ef325b..bd617e4 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 f1e7d28..123a796 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 dc2c983..aca825c 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 f6a75b6..2515b45 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 52c7a0f..2768fc5 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 87e57a8..dbd00a1 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
More information about the Libreoffice-commits
mailing list