summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config_host.mk.in2
-rw-r--r--configure.in35
-rw-r--r--solenv/gbuild/LinkTarget.mk34
-rw-r--r--solenv/gbuild/gbuild.mk2
-rw-r--r--solenv/gbuild/platform/unxgcc.mk5
5 files changed, 34 insertions, 44 deletions
diff --git a/config_host.mk.in b/config_host.mk.in
index fe5fc878e7b4..a3668d73843d 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -74,7 +74,6 @@ export DBUS_LIBS=@DBUS_LIBS@
export DB_CPPLIB=@DB_CPPLIB@
export DB_LIB=@DB_LIB@
export debug=@ENABLE_DEBUG@
-export ENABLE_DEBUG_ONLY=@ENABLE_DEBUG_ONLY@
export DEFAULT_MOZILLA_TOOLKIT=@MOZILLA_TOOLKIT@
export DEFAULT_TO_ENGLISH_FOR_PACKING=yes
export DIAGRAM_EXTENSION_PACK=@DIAGRAM_EXTENSION_PACK@
@@ -136,6 +135,7 @@ 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_SYMBOLS_ONLY=@ENABLE_SYMBOLS_ONLY@
export ENABLE_SYSTRAY_GTK=@ENABLE_SYSTRAY_GTK@
export ENABLE_XMLSEC=@ENABLE_XMLSEC@
export ENABLE_ZENITY=@ENABLE_ZENITY@
diff --git a/configure.in b/configure.in
index e6d884419be7..2bbcfdc0b5e6 100644
--- a/configure.in
+++ b/configure.in
@@ -610,7 +610,10 @@ AC_ARG_ENABLE(atl,
AC_ARG_ENABLE(symbols,
AS_HELP_STRING([--enable-symbols],
[Include debugging symbols in output. WARNING - a complete build needs
- 8 Gb of space and takes much longer (enables -g compiler flag).])
+ 8 Gb of space and takes much longer (enables -g compiler flag).
+ You can also use this switch as follows:
+ --enable-symbols="tl svx" to enable symbols only for the specified
+ gbuild-build libraries.])
[
Enabling symbols disables the stripping of the solver
(--disable-strip-solver).
@@ -637,9 +640,7 @@ AC_ARG_ENABLE(debug,
[Include debugging symbols from --enable-symbols plus extra debugging
code. Extra large build! (enables -g compiler flag and dmake debug=true)
If you need even more verbose output, build a module with
- "build -- debug=true dbglevel=2". You can also use this switch as follows:
- --enable-debug="tl svx" to enable debug only for the specified
- gbuild-build libraries.]))
+ "build -- debug=true dbglevel=2".]))
AC_ARG_ENABLE(dbgutil,
AS_HELP_STRING([--enable-dbgutil],
@@ -3426,25 +3427,17 @@ else
fi
AC_SUBST(EXTERNAL_WARNINGS_NOT_ERRORS)
-dnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols)
+dnl Set the ENABLE_DEBUG variable.
dnl ===================================================================
AC_MSG_CHECKING([whether to do a debug build])
if test -n "$enable_debug" && test "$enable_debug" != "no"; then
- if test "$enable_debug" = "y" || test "$enable_debug" = "yes"; then
- ENABLE_DEBUG="TRUE"
- ENABLE_DEBUG_ONLY=
- else
- ENABLE_DEBUG=""
- ENABLE_DEBUG_ONLY="$enable_debug"
- AC_MSG_RESULT([for $enable_debug])
- fi
+ ENABLE_DEBUG="TRUE"
+ AC_MSG_RESULT([yes])
else
ENABLE_DEBUG=""
- ENABLE_DEBUG_ONLY=""
AC_MSG_RESULT([no])
fi
AC_SUBST(ENABLE_DEBUG)
-AC_SUBST(ENABLE_DEBUG_ONLY)
dnl Determine whether to use linkoo for the smoketest installation
@@ -3475,13 +3468,21 @@ dnl whether to include symbols into final build.
dnl ===================================================================
AC_MSG_CHECKING([whether to include symbols])
if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then
- ENABLE_SYMBOLS="TRUE"
- AC_MSG_RESULT([yes])
+ if test "$enable_symbols" = "y" || test "$enable_symbols" = "yes"; then
+ ENABLE_SYMBOLS="TRUE"
+ ENABLE_SYMBOLS_ONLY=
+ else
+ ENABLE_SYMBOLS=""
+ ENABLE_SYMBOLS_ONLY="$enable_symbols"
+ AC_MSG_RESULT([for $enable_symbols])
+ fi
else
ENABLE_SYMBOLS=
+ ENABLE_SYMBOLS_ONLY=
AC_MSG_RESULT([no])
fi
AC_SUBST(ENABLE_SYMBOLS)
+AC_SUBST(ENABLE_SYMBOLS_ONLY)
dnl Determine if the solver is to be stripped or not.
dnl ===================================================================
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index cde46b074997..31a4125e974c 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -35,24 +35,20 @@
# OBJCXXFLAGS
# LDFLAGS
-# this returns the cflags/cxxflags to use from either the environment or
-# otherwise debug flags, if ENABLE_DEBUG is set or the LinkTarget is named
-# in the list of libraries of ENABLE_DEBUG_ONLY
-
-ifeq ($(gb_DEBUGLEVEL),2)
-define gb_LinkTarget__get_debugcflags
-$(if $(CFLAGS),$(CFLAGS),$(gb_DEBUG_CFLAGS))
-endef
-
-define gb_LinkTarget__get_debugcxxflags
-$(if $(CXXFLAGS),$(CXXFLAGS),$(gb_DEBUG_CFLAGS) $(gb_DEBUG_CXXFLAGS))
-endef
-
+# debug flags, if ENABLE_SYMBOLS is set or the LinkTarget is named
+# in the list of libraries of ENABLE_SYMBOLS_ONLY
+ifeq ($(gb_ENABLE_SYMBOLS),$(true))
+gb_LinkTarget__get_symbolscflags=$(gb_DEBUG_CFLAGS)
+gb_LinkTarget__get_symbolscxxflags=$(gb_DEBUG_CFLAGS) $(gb_DEBUG_CXXFLAGS)
else
-gb_LinkTarget__get_debugcflags=$(if $(filter $(1),$(foreach lib,$(ENABLE_DEBUG_ONLY),$(call gb_Library_get_linktargetname,$(lib)))),$(gb_DEBUG_CFLAGS))
-gb_LinkTarget__get_debugcxxflags=$(if $(filter $(1),$(foreach lib,$(ENABLE_DEBUG_ONLY),$(call gb_Library_get_linktargetname,$(lib)))),$(gb_DEBUG_CFLAGS) $(gb_DEBUG_CXXFLAGS))
+gb_LinkTarget__get_symbolscflags=$(if $(filter $(1),$(foreach lib,$(ENABLE_SYMBOLS_ONLY),$(call gb_Library_get_linktargetname,$(lib)))),$(gb_DEBUG_CFLAGS))
+gb_LinkTarget__get_symbolscxxflags=$(if $(filter $(1),$(foreach lib,$(ENABLE_SYMBOLS_ONLY),$(call gb_Library_get_linktargetname,$(lib)))),$(gb_DEBUG_CFLAGS) $(gb_DEBUG_CXXFLAGS))
endif
+# generic cflags/cxxflags to use (optimization flags, symbols (i.e. debug) flags, flags from environment)
+gb_LinkTarget__get_cflags=$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_symbolscflags,$(1)) $(CFLAGS)
+gb_LinkTarget__get_cxxflags=$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_symbolscxxflags,$(1)) $(CXXFLAGS)
+
# Overview of dependencies and tasks of LinkTarget
#
# target task depends on
@@ -704,7 +700,7 @@ $(call gb_LinkTarget_get_clean_target,$(1)) : COBJECTS += $(2)
$(call gb_LinkTarget_get_target,$(1)) : $(call gb_CObject_get_target,$(2))
$(call gb_CObject_get_target,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1))
-$(call gb_CObject_get_target,$(2)) : T_CFLAGS += $(call gb_LinkTarget__get_debugcflags,$(1)) $(3)
+$(call gb_CObject_get_target,$(2)) : T_CFLAGS += $(call gb_LinkTarget__get_cflags,$(1)) $(3)
$(call gb_CObject_get_target,$(2)) : \
OBJECTOWNER := $(call gb_Object__owner,$(2),$(1))
@@ -844,11 +840,11 @@ $(foreach grammar,$(2),$(call gb_LinkTarget_add_grammar,$(1),$(grammar)))
endef
define gb_LinkTarget_add_noexception_object
-$(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_NOEXCEPTIONFLAGS) $(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_debugcxxflags,$(1)))
+$(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_NOEXCEPTIONFLAGS) $(call gb_LinkTarget__get_cxxflags,$(1)))
endef
define gb_LinkTarget_add_exception_object
-$(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_EXCEPTIONFLAGS) $(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_debugcxxflags,$(1)))
+$(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_EXCEPTIONFLAGS) $(call gb_LinkTarget__get_cxxflags,$(1)))
endef
define gb_LinkTarget_add_linktarget_objects
@@ -931,7 +927,7 @@ $(foreach obj,$(2),$(call gb_LinkTarget_add_generated_cxx_object,$(1),$(obj),$(3
endef
define gb_LinkTarget_add_generated_exception_object
-$(call gb_LinkTarget_add_generated_cxx_object,$(1),$(2),$(gb_LinkTarget_EXCEPTIONFLAGS) $(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_debugcxxflags,$(1)))
+$(call gb_LinkTarget_add_generated_cxx_object,$(1),$(2),$(gb_LinkTarget_EXCEPTIONFLAGS) $(call gb_LinkTarget__get_cxxflags,$(1)))
endef
define gb_LinkTarget_add_generated_exception_objects
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index b12c88fd9c02..8e5141b213f2 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -94,8 +94,6 @@ endif
gb_DEBUGLEVEL := 0
ifneq ($(strip $(DEBUG)$(debug)),)
gb_DEBUGLEVEL := 1
-else ifeq ($(gb_PRODUCT),$(false))
-gb_DEBUGLEVEL := 1
endif
ifneq ($(strip $(DBGLEVEL)$(dbglevel)),)
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 58bc7eb79ca1..8674cded4d27 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -210,11 +210,6 @@ 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