[Libreoffice-commits] .: 8 commits - config_host.mk.in configure.ac solenv/gbuild solenv/inc

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Oct 22 05:56:47 PDT 2012


 config_host.mk.in                       |   20 ++-
 configure.ac                            |  207 +++++++++++++++++++-------------
 solenv/gbuild/CppunitTest.mk            |    2 
 solenv/gbuild/Executable.mk             |    2 
 solenv/gbuild/Library.mk                |    2 
 solenv/gbuild/LinkTarget.mk             |   15 +-
 solenv/gbuild/Module.mk                 |    4 
 solenv/gbuild/StaticLibrary.mk          |    2 
 solenv/gbuild/gbuild.help.txt           |   12 -
 solenv/gbuild/gbuild.mk                 |   42 ++----
 solenv/gbuild/platform/IOS_ARM_GCC.mk   |    7 -
 solenv/gbuild/platform/WNT_INTEL_GCC.mk |    5 
 solenv/gbuild/platform/WNT_INTEL_MSC.mk |    5 
 solenv/gbuild/platform/com_GCC_defs.mk  |    2 
 solenv/gbuild/platform/macosx.mk        |    7 -
 solenv/gbuild/platform/solaris.mk       |   14 +-
 solenv/gbuild/platform/unxgcc.mk        |   14 +-
 solenv/inc/settings.mk                  |   15 +-
 18 files changed, 207 insertions(+), 170 deletions(-)

New commits:
commit f1386b7706686e0c65ba0ad6d92574658cdca3a9
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Mon Oct 22 14:54:14 2012 +0200

    make dmake use C(XX)FLAGS from the environment too
    
    Change-Id: I2214674181c137a312b0109e7d19a1fd2fc942be

diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk
index 29e245e..6ab5211 100644
--- a/solenv/inc/settings.mk
+++ b/solenv/inc/settings.mk
@@ -146,7 +146,7 @@ CDEFSDEBUG=
 CDEFSDBGUTIL=
 CDEFSOPT=
 
-CFLAGS=
+#CFLAGS=
 CFLAGSCALL=
 CFLAGSCXX=
 CFLAGSCC=
@@ -227,7 +227,7 @@ PASCAL=
 BFLAGS=
 COBFLAGS=
 CPPFLAGS=
-CXXFLAGS=
+#CXXFLAGS=
 FFLAGS=
 PFLAGS=
 RFLAGS=
@@ -1049,6 +1049,13 @@ CFLAGSCC+=$(CFLAGSENABLESYMBOLS_CC_ONLY)
 .ENDIF          # "$(DEBUG)" == ""
 .ENDIF          # ("$(ENABLE_CRASHDUMP)"!="" && "$(ENABLE_CRASHDUMP)"!="DUMMY") || "$(ENABLE_DEBUG)"!=""
 
+.IF "$(CFLAGS)"!=""
+CFLAGSCC+=$(CFLAGS)
+.ENDIF
+.IF "$(CXXFLAGS)"!=""
+CFLAGSCXX+=$(CXXFLAGS)
+.ENDIF
+
 .IF "$(profile)"!=""
 CDEFS+= $(CDEFSPROF)
 CFLAGS+= $(CFLAGSPROF)
commit 07f67f3ed79913afc6614357e95d1b263064b2b5
Author: Lubos Lunak <l.lunak at suse.cz>
Date:   Fri Oct 19 17:23:17 2012 +0200

    fail on configure debug options that no longer make sense
    
    Change-Id: I4d01e0e00bd06e219fdc0208292ddcd5631fa235

diff --git a/configure.ac b/configure.ac
index ac52b59..c493a74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4208,7 +4208,13 @@ AC_SUBST(PROEXT)
 dnl Set the ENABLE_DEBUG variable.
 dnl ===================================================================
 AC_MSG_CHECKING([whether to do a debug build])
+if test -n "$enable_debug" && test "$enable_debug" != "yes" && test "$enable_debug" != "no"; then
+    AC_MSG_ERROR([--enable-debug now accepts only yes or no, use --enable-selective-debuginfo])
+fi
 if test -n "$ENABLE_DBGUTIL"; then
+    if test "$enable_debug" = "no"; then
+        AC_MSG_ERROR([--disable-debug cannot be used with --enable-dbgutil])
+    fi
     ENABLE_DEBUG="TRUE"
     AC_MSG_RESULT([yes (dbgutil)])
 elif test -n "$enable_debug" && test "$enable_debug" != "no"; then
commit 40763e05acac832a274c194564ff1b182ee01d3f
Author: Lubos Lunak <l.lunak at suse.cz>
Date:   Fri Oct 19 17:00:46 2012 +0200

    disable gb_COMPILEROPTFLAGS in debug mode
    
    This means that modules where --enable-selective-debuginfo disables -g
    do not revert back to -O just because -g is not wanted there. As this
    will presumably happen with modules the developer does not care about,
    there's no gain from the -O and the compile there would take longer.
    
    Change-Id: Ied84d2f69035d6580279b0657c5a5ba5440c6f16

diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 9a17541..fc6783d 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -154,7 +154,12 @@ endif
 
 gb_DEBUG_CFLAGS := -ggdb2 -finline-limit=0 -fno-inline -fno-default-inline
 
+ifneq ($(gb_DEBUGLEVEL),0)
+gb_COMPILEROPTFLAGS :=
+else
 gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS)
+endif
+
 gb_COMPILERNOOPTFLAGS := -O0
 
 # LinkTarget class
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index c5c7a30..f90963e 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -153,7 +153,12 @@ else
 gb_LINKEROPTFLAGS := -Wl,-O1
 endif
 
+ifneq ($(gb_DEBUGLEVEL),0)
+gb_COMPILEROPTFLAGS :=
+else
 gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS)
+endif
+
 gb_COMPILERNOOPTFLAGS := -O0
 
 gb_LINKERSTRIPDEBUGFLAGS := -Wl,-S
commit 84b4293e3dc6edd59e7d09383320361aaeed9e87
Author: Lubos Lunak <l.lunak at suse.cz>
Date:   Fri Oct 19 16:27:35 2012 +0200

    allow LDFLAGS from gbuild to be selective too
    
    Just like CXXFLAGS can be controlled using --enable-selective-debuginfo.
    Non-debug libraries can be debug-stripped this way, which can save quite
    some disk space with those cppunittests which just include all .o's from sw/sc.
    
    Change-Id: Ib947f76f535161e4eef1421a5539df5e25fa4042

diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index f4145dc..3267696 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -102,7 +102,7 @@ $(call gb_CppunitTest__CppunitTest_impl,$(1),$(call gb_CppunitTest__get_linktarg
 endef
 
 define gb_CppunitTest__CppunitTest_impl
-$(call gb_LinkTarget_LinkTarget,$(2))
+$(call gb_LinkTarget_LinkTarget,$(2),CppunitTest_$(1))
 $(call gb_LinkTarget_set_targettype,$(2),CppunitTest)
 $(call gb_LinkTarget_add_libs,$(2),$(gb_STDLIBS))
 $(call gb_LinkTarget_add_defs,$(2),\
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index 8c17817..7517e16 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -52,7 +52,7 @@ $(call gb_Executable__Executable_impl,$(1),Executable/$(1)$(gb_Executable_EXT))
 endef
 
 define gb_Executable__Executable_impl
-$(call gb_LinkTarget_LinkTarget,$(2))
+$(call gb_LinkTarget_LinkTarget,$(2),Executable_$(1))
 $(call gb_LinkTarget_set_targettype,$(2),Executable)
 $(call gb_LinkTarget_add_libs,$(2),$(gb_STDLIBS))
 $(call gb_Executable_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2)) \
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index d07fe24..924a254 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -66,7 +66,7 @@ $(call gb_Library__Library_impl,$(1),$(call gb_Library_get_linktargetname,$(1)))
 endef
 
 define gb_Library__Library_impl
-$(call gb_LinkTarget_LinkTarget,$(2))
+$(call gb_LinkTarget_LinkTarget,$(2),Library_$(1))
 $(call gb_LinkTarget_set_targettype,$(2),Library)
 $(call gb_LinkTarget_add_libs,$(2),$(gb_STDLIBS))
 $(call gb_LinkTarget_add_defs,$(2),\
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index a87ecf4..69b9ee0 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -47,12 +47,19 @@ gb_LinkTarget__debug_enabled = \
 gb_LinkTarget__get_debugcflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS))
 gb_LinkTarget__get_debugcxxflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUG_CFLAGS) $(gb_DEBUG_CXXFLAGS),$(gb_COMPILEROPTFLAGS))
 
+# similar for LDFLAGS, use linker optimization flags in non-debug case,
+# 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 $(call gb_LinkTarget__debug_enabled,$(1)),,$(gb_LINKERSTRIPDEBUGFLAGS))
+gb_LinkTarget__get_debugldflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),,$(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
 gb_LinkTarget__get_cflags=$(if $(CFLAGS),$(CFLAGS),$(call gb_LinkTarget__get_debugcflags,$(1)))
 gb_LinkTarget__get_objcflags=$(if $(OBJCFLAGS),$(OBJCFLAGS),$(call gb_LinkTarget__get_debugcflags,$(1)))
 gb_LinkTarget__get_cxxflags=$(if $(CXXFLAGS),$(CXXFLAGS),$(call gb_LinkTarget__get_debugcxxflags,$(1)))
 gb_LinkTarget__get_objcxxflags=$(if $(OBJCXXFLAGS),$(OBJCXXFLAGS),$(call gb_LinkTarget__get_debugcxxflags,$(1)))
+gb_LinkTarget__get_ldflags=$(if $(LDFLAGS),$(LDFLAGS),$(call gb_LinkTarget__get_debugldflags,$(1)))
 
 # Overview of dependencies and tasks of LinkTarget
 #
@@ -508,7 +515,7 @@ $(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : INCLUDE := $$(gb_LinkTarget_INCLUDE)
 $(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : INCLUDE_STL := $$(gb_LinkTarget_INCLUDE_STL)
-$(call gb_LinkTarget_get_target,$(1)) : T_LDFLAGS := $$(gb_LinkTarget_LDFLAGS) $(if $(LDFLAGS),$(LDFLAGS),$(gb_LINKEROPTFLAGS))
+$(call gb_LinkTarget_get_target,$(1)) : T_LDFLAGS := $$(gb_LinkTarget_LDFLAGS) $(call gb_LinkTarget__get_ldflags,$(2))
 $(call gb_LinkTarget_get_target,$(1)) : LINKED_LIBS :=
 $(call gb_LinkTarget_get_target,$(1)) : LINKED_STATIC_LIBS :=
 $(call gb_LinkTarget_get_target,$(1)) : LIBS :=
diff --git a/solenv/gbuild/StaticLibrary.mk b/solenv/gbuild/StaticLibrary.mk
index a09f720..fdebb6a 100644
--- a/solenv/gbuild/StaticLibrary.mk
+++ b/solenv/gbuild/StaticLibrary.mk
@@ -59,7 +59,7 @@ $(call gb_StaticLibrary__StaticLibrary_impl,$(1),$(call gb_StaticLibrary_get_lin
 endef
 
 define gb_StaticLibrary__StaticLibrary_impl
-$(call gb_LinkTarget_LinkTarget,$(2))
+$(call gb_LinkTarget_LinkTarget,$(2),StaticLibrary_$(1))
 $(call gb_LinkTarget_set_targettype,$(2),StaticLibrary)
 $(call gb_StaticLibrary_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2)) \
 	| $(dir $(call gb_StaticLibrary_get_target,$(1))).dir
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index f44951a..c5c7a30 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -156,6 +156,8 @@ endif
 gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS)
 gb_COMPILERNOOPTFLAGS := -O0
 
+gb_LINKERSTRIPDEBUGFLAGS := -Wl,-S
+
 # LinkTarget class
 
 define gb_LinkTarget__get_rpath_for_layer
commit 3c00ff3a4501d1b4164373c5f6e15b464df6854b
Author: Lubos Lunak <l.lunak at suse.cz>
Date:   Fri Oct 19 13:33:13 2012 +0200

    make configure remember C/CXX/OBJC/OBJCXX/LDFLAGS if explicitly passed to it
    
    If not, the build system selects the right flags depending on --enable-debug
    etc. , but e.g. packagers may want to do builds with e.g. both -O and -g.
    This is also reasonably close to what autotools do, except that there configure
    forces -g -O2 if nothing is explicitly given.
    
    Change-Id: I1889569177ad3cbd6decdc7e9986f67ef5d4456a

diff --git a/config_host.mk.in b/config_host.mk.in
index 8708ac8..91acee5 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -55,6 +55,9 @@ export CC_FOR_BUILD=@CC_FOR_BUILD@
 export CDR_CFLAGS=@CDR_CFLAGS@
 export CDR_LIBS=@CDR_LIBS@
 export CDR_TARBALL=@CDR_TARBALL@
+ifneq ($(strip @CFLAGS@),)
+export CFLAGS=@CFLAGS@
+endif
 export CHECK_PARALLELISM=@CHECK_PARALLELISM@
 export CLASSPATH=@CLASSPATH@
 export CLUCENE_CFLAGS=@CLUCENE_CFLAGS@
@@ -86,6 +89,9 @@ export CURL_LIBS=@CURL_LIBS@
 export CXX=@CXX@
 export CXX_FOR_BUILD=@CXX_FOR_BUILD@
 export CXX_X64_BINARY=@CXX_X64_BINARY@
+ifneq ($(strip @CXXFLAGS@),)
+export CXXFLAGS=@CXXFLAGS@
+endif
 export DATADIR=@DATADIR@
 export DBGHELP_DLL=@DBGHELP_DLL@
 export DBUSMENUGTK_CFLAGS=@DBUSMENUGTK_CFLAGS@
@@ -301,6 +307,9 @@ export LANGUAGETOOL_TARBALL=@LANGUAGETOOL_TARBALL@
 export L10N_MODULE=@L10N_MODULE@
 export LCMS2_CFLAGS=@LCMS2_CFLAGS@
 export LCMS2_LIBS=@LCMS2_LIBS@
+ifneq ($(strip @LDFLAGS@),)
+export LDFLAGS=@LDFLAGS@
+endif
 export LFS_CFLAGS=@LFS_CFLAGS@
 export LIBBASE_JAR=@LIBBASE_JAR@
 export LIBDIR=@LIBDIR@
@@ -430,6 +439,12 @@ export nodep=@nodep@
 export NSS_CFLAGS=@NSS_CFLAGS@
 export NSS_LIBS=@NSS_LIBS@
 export NUMBERTEXT_EXTENSION_PACK=@NUMBERTEXT_EXTENSION_PACK@
+ifneq ($(strip @OBJCFLAGS@),)
+export OBJCFLAGS=@OBJCFLAGS@
+endif
+ifneq ($(strip @OBJCXXFLAGS@),)
+export OBJCXXFLAGS=@OBJCXXFLAGS@
+endif
 export OBJDUMP=@OBJDUMP@
 export OOOBLOGGER_EXTENSION_PACK=@OOOBLOGGER_EXTENSION_PACK@
 export OOODMAKEMODE=YES
diff --git a/configure.ac b/configure.ac
index c5e3dac..ac52b59 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2568,7 +2568,10 @@ fi
 
 dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
+    # AC_PROG_CC sets CFLAGS to -g -O2 if not set, avoid that
+    save_CFLAGS=$CFLAGS
     AC_PROG_CC
+    CFLAGS=$save_CFLAGS
 fi
 
 COMPATH=`dirname "$CC"`
@@ -4231,6 +4234,44 @@ if test -n "$ENABLE_DEBUG"; then
 fi
 AC_SUBST(ENABLE_DEBUGINFO_FOR)
 
+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)
+if test -n "$CFLAGS"; then
+    AC_MSG_RESULT([$CFLAGS])
+else
+    AC_MSG_RESULT(no)
+fi
+AC_MSG_CHECKING(for explicit CXXFLAGS)
+if test -n "$CXXFLAGS"; then
+    AC_MSG_RESULT([$CXXFLAGS])
+else
+    AC_MSG_RESULT(no)
+fi
+AC_MSG_CHECKING(for explicit OBJCFLAGS)
+if test -n "$OBJCFLAGS"; then
+    AC_MSG_RESULT([$OBJCFLAGS])
+else
+    AC_MSG_RESULT(no)
+fi
+AC_MSG_CHECKING(for explicit OBJCXXFLAGS)
+if test -n "$OBJCXXFLAGS"; then
+    AC_MSG_RESULT([$OBJCXXFLAGS])
+else
+    AC_MSG_RESULT(no)
+fi
+AC_MSG_CHECKING(for explicit LDFLAGS)
+if test -n "$LDFLAGS"; then
+    AC_MSG_RESULT([$LDFLAGS])
+else
+    AC_MSG_RESULT(no)
+fi
+AC_SUBST(CFLAGS)
+AC_SUBST(CXXFLAGS)
+AC_SUBST(OBJCFLAGS)
+AC_SUBST(OBJCXXFLAGS)
+AC_SUBST(LDFLAGS)
+
 dnl Determine whether to use linkoo for the smoketest installation
 dnl ===================================================================
 AC_MSG_CHECKING([whether to use linkoo for the smoketest installation])
@@ -4817,7 +4858,10 @@ dnl Testing for C++ compiler and version...
 dnl ===================================================================
 
 if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
+    # AC_PROG_CXX sets CXXFLAGS to -g -O2 if not set, avoid that
+    save_CXXFLAGS=$CXXFLAGS
     AC_PROG_CXX
+    CXXFLAGS=$save_CXXFLAGS
 else
     if test -n "$CC" -a -z "$CXX"; then
         CXX="$CC"
commit 156c18ad56df7ddae96330a89940c869583bb04f
Author: Lubos Lunak <l.lunak at suse.cz>
Date:   Fri Oct 19 12:54:06 2012 +0200

    we use -ggdb2 by default, not -ggdb3 (makes debuginfo way too big)
    
    Change-Id: Icd5a2c6ac25e16d2f221a67dc2add775dbf756b4

diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index c7f2439..9a17541 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -152,7 +152,7 @@ else
 gb_LINKEROPTFLAGS := -Wl,-O1
 endif
 
-gb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
+gb_DEBUG_CFLAGS := -ggdb2 -finline-limit=0 -fno-inline -fno-default-inline
 
 gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS)
 gb_COMPILERNOOPTFLAGS := -O0
commit 4e2e6bca852e9937ea001451a40734b6ee97d860
Author: Lubos Lunak <l.lunak at suse.cz>
Date:   Fri Oct 19 12:49:36 2012 +0200

    use (gb_)ENABLE_DBGUTIL rather than the confusing (gb_)PRODUCT
    
    Using --enable-debug already makes the build a non-product build,
    so this whole 'product' notion is rather confusing when reading
    the build system code.
    
    Change-Id: I4bb6b879a6bcd8c76c4b48ddaccb433ab8eb4bb2

diff --git a/configure.ac b/configure.ac
index 2ebeba9..c5e3dac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5016,7 +5016,7 @@ AC_SUBST(ALIGNOF_DOUBLE)
 dnl ===================================================================
 dnl Check if valgrind.h is available
 dnl ===================================================================
-if test "$cross_compiling" != "yes" -a "$enable_dbgutil" != "no" -a \
+if test "$cross_compiling" != "yes" -a -n "$ENABLE_DBGUTIL" -a \
         -z "$VALGRIND_CFLAGS"; then
     dnl Test $prefix (currently only testing for /usr and /usr/local)
     dnl so that VALGRIND_CFLAGS = -I$prefix/include/valgrind
@@ -5044,7 +5044,7 @@ COMPILER_PLUGINS=
 if test "$COM_GCC_IS_CLANG" = "TRUE"; then
     if test -n "$enable_compiler_plugins"; then
         compiler_plugins="$enable_compiler_plugins"
-    elif test -n "$enable_dbgutil" -a "$enable_dbgutil" != "no"; then
+    elif test -n "$ENABLE_DBGUTIL"; then
         compiler_plugins=test
     else
         compiler_plugins=no
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 2bd1968..521d4bd 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -80,18 +80,19 @@ endif
 
 include $(GBUILDDIR)/Output.mk
 
-
-ifneq ($(strip $(PRODUCT)$(product)),)
-gb_PRODUCT := $(true)
-else
-gb_PRODUCT := $(false)
-endif
-
 gb_TIMELOG := 0
 ifneq ($(strip $(TIMELOG)$(timelog)),)
 gb_TIMELOG := 1
 endif
 
+# This used to be PRODUCT="" (for the same meaning as ENABLE_DBGUTIL="TRUE"),
+# but the product meaning is now only confusing.
+ifneq ($(ENABLE_DBGUTIL),)
+gb_ENABLE_DBGUTIL := $(true)
+else
+gb_ENABLE_DBGUTIL := $(false)
+endif
+
 gb_DEBUGLEVEL := 0
 ifneq ($(strip $(DEBUG)),)
 gb_DEBUGLEVEL := 1
@@ -106,7 +107,7 @@ ifeq ($(origin debug),command line)
 ENABLE_DEBUGINFO_FOR := all
 endif
 endif
-ifeq ($(gb_PRODUCT),$(false))
+ifeq ($(gb_ENABLE_DBGUTIL),$(true))
 gb_DEBUGLEVEL := 1
 endif
 
@@ -231,7 +232,7 @@ gb_GLOBALDEFS := \
 	$(gb_CPUDEFS) \
 
 
-ifeq ($(gb_PRODUCT),$(false))
+ifeq ($(gb_ENABLE_DBGUTIL),$(true))
 gb_GLOBALDEFS += -DDBG_UTIL \
 
 ifneq ($(COM),MSC)
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index a3d2672..5845a60 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -110,7 +110,7 @@ gb_LinkTarget_EXCEPTIONFLAGS := \
 	-DEXCEPTIONS_ON \
 	-fexceptions
 
-ifeq ($(gb_PRODUCT),$(true))
+ifeq ($(gb_ENABLE_DBGUTIL),$(false))
 # Clang doesn't have this option
 ifeq ($(HAVE_GCC_FNO_ENFORCE_EH_SPECS),TRUE)
 gb_LinkTarget_EXCEPTIONFLAGS += \
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 18c94e2..c7f2439 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -78,7 +78,7 @@ gb_CXXFLAGS := \
 	-Wno-non-virtual-dtor \
 
 # enable debug STL
-ifeq ($(gb_PRODUCT),$(false))
+ifeq ($(gb_ENABLE_DBGUTIL),$(true))
 gb_COMPILERDEFS += \
 	-D_GLIBCXX_DEBUG \
 
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index faf494a..f44951a 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -83,7 +83,7 @@ gb_COMPILERDEFS += \
 endif
 
 # enable debug STL
-ifeq ($(gb_PRODUCT),$(false))
+ifeq ($(gb_ENABLE_DBGUTIL),$(true))
 gb_COMPILERDEFS += \
 	-D_GLIBCXX_DEBUG \
 
commit a0320a908875f42bab9983ffe4db5b49fe7ba2f6
Author: Lubos Lunak <l.lunak at suse.cz>
Date:   Fri Oct 19 12:47:37 2012 +0200

    clean up configure options for debugging build
    
    By default a product (non-developer) build is done. Code is optimized and no debugging
    information is included (may be overriden though, see below).
    
    Developers should preferably build with --enable-dbgutil , or at least --enable-debug.
    
    The --enable-symbols switch has been removed. Use explicit CFLAGS/CXXFLAGS/LDFLAGS instead
    if needed.
    
    With --enable-debug optimizations are turned off and debugging information is included
    (in order to make it possible to examine the code in a debugger). Additionally assertions
    and logging is enabled (see SAL_WARN/SAL_INFO documentation for details and better control).
    This switch should primarily by used for occassional development (such as when it is needed
    to debug one module in a non-debug build, see also 'make DEBUG=true' below).
    
    Using --enable-dbgutil is the recommended developer option. In addition to --enable-debug
    it also enables additional checks, such as debugging mode for STL or checking compiler
    plugins. This switch may also enable additional logging from obsolete debugging tools
    (which should be converted to SAL_WARN/SAL_INFO for better control). Note that this option
    makes the build binary incompatible from a --disable-dbgutil build, so it is not possible
    to mix them.
    
    When using --enable-debug/--enable-dbgutil , the build is noticeably larger because of the included
    debugging information (compiler -g option). When disk space is an issue (or the computer
    is not very powerful), the --enable-selective-debuginfo option allow specifying where
    the debugging information should or should not be used. The option takes a list of arguments,
    where all means everything, - prepended means not to enable, / appended means everything
    in the directory; there is no ordering, more specific overrides more general,
    and disabling takes precedence). For example, --enable-selective-debuginfo="all -sw/ -Library_sc"
    enables debugginfo for everything except for anything in the sw module and the sc library.
    
    Explicitly specified CFLAGS/CXXFLAGS/LDFLAGS override optimization and debugging options
    (can be now also passed to configure which will make the build system use them).
    
    If in a non-debug build it is needed to temporary build something as a debug build,
    'make DEBUG=true' temporarily works as if --enable-debug was specified. It also temporarily
    overrides debuginfo disabled using --enable-selective-debuginfo.
    
    Old code using old logging functionality also has a concept of a debug level, forced using
    'make DBGLEVEL=2'. Using a debug level of 2 (or higher) enables additional logging output.
    New code should use SAL_WARN/SAL_INFO and use extra areas for additional logging output
    that can be selectively enabled/disabled using SAL_LOG variable.
    
    (Some smaller parts of this design will be implemented by separate follow-up commits.)
    
    Change-Id: Ia6420ee3c99c217ead648e8967165eed7f632258

diff --git a/config_host.mk.in b/config_host.mk.in
index 8e328d2..8708ac8 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -123,7 +123,9 @@ export ENABLE_CRASHDUMP=@ENABLE_CRASHDUMP@
 export ENABLE_CUPS=@ENABLE_CUPS@
 export ENABLE_DBUS=@ENABLE_DBUS@
 export ENABLE_PACKAGEKIT=@ENABLE_PACKAGEKIT@
-export ENABLE_DEBUG_FOR=@ENABLE_DEBUG_FOR@
+export ENABLE_DBGUTIL=@ENABLE_DBGUTIL@
+export ENABLE_DEBUG=@ENABLE_DEBUG@
+export ENABLE_DEBUGINFO_FOR=@ENABLE_DEBUGINFO_FOR@
 export ENABLE_DIRECTX=@ENABLE_DIRECTX@
 export ENABLE_EVOAB2=@ENABLE_EVOAB2@
 export ENABLE_GCONF=@ENABLE_GCONF@
@@ -166,7 +168,6 @@ 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 78836b2..2ebeba9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -752,13 +752,6 @@ AC_ARG_ENABLE(atl,
     ],
 ,)
 
-AC_ARG_ENABLE(symbols,
-    AS_HELP_STRING([--enable-symbols],
-        [Include debugging information in output ("symbols" is misleading here;
-         enables -g compiler option or equivalent).  WARNING: A complete build
-         needs a lot of space (roughly 10 GiB) and takes much longer.]),
-,)
-
 AC_ARG_ENABLE(werror,
     AS_HELP_STRING([--enable-werror],
         [Turn warnings to errors. (Has no effect in modules where the treating
@@ -772,25 +765,26 @@ AC_ARG_ENABLE(assert-always-abort,
 
 AC_ARG_ENABLE(debug,
     AS_HELP_STRING([--enable-debug],
-        [Include debugging information like with --enable-symbols, disable
-         compiler optimization and inlining plus extra debugging code like
-         assertions. 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="all -sw/ -Library_sc" to enable debugging only for
-         the specified gbuild-build targets (all means everything, - prepended
-         means not to enable, / appended means everything in the directory,
-         there is no ordering, more specific overrides more general, and
-         disabling takes precedence).]))
+        [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],
-        [Include additional debugging utilities, such as assertions, object
-         counting, etc. Larger build. Independent from --enable-debug.
-         Note that this option makes the build ABI incompatible:
-         It is not possible to mix object files or libraries from a
-         --enable-dbgutil and a --disable-dbgutil build.]))
+        [Provide debugging support from --enable-debug and include additional debugging
+         utilities such as object counting or more expensive checks.
+         This is the recommended option for developers.
+         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(selective-debuginfo,
+    AS_HELP_STRING([--enable-selective-debuginfo],
+        [If --enable-debug or --enable-dbgutil is used, build debugging information
+         (-g compiler flag) only for the specified gbuild build targets
+         (where all means everything, - prepended means not to enable, / appended means
+         everything in the directory; there is no ordering, more specific overrides
+         more general, and disabling takes precedence).
+         Example: --enable-selective-debuginfo="all -sw/ -Library_sc".]))
 
 AC_ARG_ENABLE(compiler-plugins,
     AS_HELP_STRING([--enable-compiler-plugins],
@@ -3069,38 +3063,6 @@ printf ("hello world\n");
 fi
 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
 
-dnl Set the ENABLE_DBGUTIL variable
-dnl ===================================================================
-AC_MSG_CHECKING([whether to build with additional debug utilities])
-if test -n "$enable_dbgutil" -a "$enable_dbgutil" != "no"; then
-    PROEXT=""
-    PRODUCT=""
-
-    AC_MSG_RESULT([yes])
-    # cppunit and graphite expose STL in public headers
-    if test "$with_system_cppunit" = "yes"; then
-        AC_MSG_ERROR([--with-system-cppunit conflicts with DBG_UTIL build])
-    else
-        with_system_cppunit=no
-    fi
-    if test "$with_system_graphite" = "yes"; then
-        AC_MSG_ERROR([--with-system-graphite conflicts with DBG_UTIL build])
-    else
-        with_system_graphite=no
-    fi
-    if test "$with_system_mysql_cppconn" = "yes"; then
-        AC_MSG_ERROR([--with-system-mysql-cppconn conflicts with DBG_UTIL build])
-    else
-        with_system_mysql_cppconn=no
-    fi
-else
-    PRODUCT="full"
-    PROEXT=".pro"
-    AC_MSG_RESULT([no, full product build])
-fi
-AC_SUBST(PRODUCT)
-AC_SUBST(PROEXT)
-
 dnl ===================================================================
 dnl  Check which Microsoft C/C++ or MinGW compiler is used for WINNT
 dnl ===================================================================
@@ -4204,27 +4166,70 @@ else
 fi
 AC_SUBST(ASSERT_ALWAYS_ABORT)
 
-dnl Set the ENABLE_DEBUG variable.
+dnl Set the ENABLE_DBGUTIL 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_FOR=all
-        AC_MSG_RESULT([yes])
+AC_MSG_CHECKING([whether to build with additional debug utilities])
+if test -n "$enable_dbgutil" -a "$enable_dbgutil" != "no"; then
+    ENABLE_DBGUTIL="TRUE"
+    PROEXT=""
+    PRODUCT=""
+
+    AC_MSG_RESULT([yes])
+    # cppunit and graphite expose STL in public headers
+    if test "$with_system_cppunit" = "yes"; then
+        AC_MSG_ERROR([--with-system-cppunit conflicts with --enable-dbgutil])
     else
-        ENABLE_DEBUG=""
-        ENABLE_DEBUG_FOR="$enable_debug"
-        AC_MSG_RESULT([for $enable_debug])
+        with_system_cppunit=no
+    fi
+    if test "$with_system_graphite" = "yes"; then
+        AC_MSG_ERROR([--with-system-graphite conflicts with --enable-dbgutil])
+    else
+        with_system_graphite=no
+    fi
+    if test "$with_system_mysql_cppconn" = "yes"; then
+        AC_MSG_ERROR([--with-system-mysql-cppconn conflicts with --enable-dbgutil])
+    else
+        with_system_mysql_cppconn=no
     fi
 else
+    ENABLE_DBGUTIL=""
+    # PRODUCT is old concept, still used by build.pl .
+    PRODUCT="full"
+    PROEXT=".pro"
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_DBGUTIL)
+AC_SUBST(PRODUCT)
+AC_SUBST(PROEXT)
+
+dnl Set the ENABLE_DEBUG variable.
+dnl ===================================================================
+AC_MSG_CHECKING([whether to do a debug build])
+if test -n "$ENABLE_DBGUTIL"; then
+    ENABLE_DEBUG="TRUE"
+    AC_MSG_RESULT([yes (dbgutil)])
+elif test -n "$enable_debug" && test "$enable_debug" != "no"; then
+    ENABLE_DEBUG="TRUE"
+    AC_MSG_RESULT([yes])
+else
     ENABLE_DEBUG=""
-    ENABLE_DEBUG_FOR=""
     AC_MSG_RESULT([no])
 fi
 AC_SUBST(ENABLE_DEBUG)
-AC_SUBST(ENABLE_DEBUG_FOR)
 
+dnl Selective debuginfo
+ENABLE_DEBUGINFO_FOR=
+if test -n "$ENABLE_DEBUG"; then
+    AC_MSG_CHECKING([whether to use selective debuginfo])
+    if test -n "$enable_selective_debuginfo" -a "$enable_selective_debuginfo" != "no"; then
+        ENABLE_DEBUGINFO_FOR="$enable_selective_debuginfo"
+        AC_MSG_RESULT([for "$enable_selective_debuginfo"])
+    else
+        ENABLE_DEBUGINFO_FOR=all
+        AC_MSG_RESULT([no, for all])
+    fi
+fi
+AC_SUBST(ENABLE_DEBUGINFO_FOR)
 
 dnl Determine whether to use linkoo for the smoketest installation
 dnl ===================================================================
@@ -4250,22 +4255,6 @@ else
 fi
 AC_SUBST(ENABLE_LTO)
 
-dnl whether to include debgugging information into final build.
-dnl ===================================================================
-AC_MSG_CHECKING([whether to include debugging information])
-if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then
-    ENABLE_SYMBOLS="TRUE"
-    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)
-
 if test "$enable_headless" = "yes"; then
     # be sure to do not mess with uneeded stuff
     test_randr=no
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 870bad1..a87ecf4 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -38,12 +38,12 @@
 
 # enable if: no "-TARGET" defined AND [module is enabled OR "TARGET" defined]
 gb_LinkTarget__debug_enabled = \
- $(and $(if $(filter -$(1),$(ENABLE_DEBUG_FOR)),,$(true)),\
+ $(and $(if $(filter -$(1),$(ENABLE_DEBUGINFO_FOR)),,$(true)),\
        $(or $(gb_Module_CURRENTMODULE_DEBUG_ENABLED),\
-            $(filter $(1),$(ENABLE_DEBUG_FOR))))
+            $(filter $(1),$(ENABLE_DEBUGINFO_FOR))))
 
 # debug flags, if ENABLE_DEBUG is set and the LinkTarget is named
-# in the list of libraries of ENABLE_DEBUG_FOR
+# in the list of libraries of ENABLE_DEBUGINFO_FOR
 gb_LinkTarget__get_debugcflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS))
 gb_LinkTarget__get_debugcxxflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUG_CFLAGS) $(gb_DEBUG_CXXFLAGS),$(gb_COMPILEROPTFLAGS))
 
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index 17fc857..97f1a81 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -190,8 +190,8 @@ showmodules :
 
 # enable if: no "-MODULE/" defined AND ["all" defined OR "MODULE/" defined]
 gb_Module__debug_enabled = \
- $(and $(if $(filter -$(1)/,$(ENABLE_DEBUG_FOR)),,$(true)),\
-       $(filter all $(1)/,$(ENABLE_DEBUG_FOR)))
+ $(and $(if $(filter -$(1)/,$(ENABLE_DEBUGINFO_FOR)),,$(true)),\
+       $(filter all $(1)/,$(ENABLE_DEBUGINFO_FOR)))
 
 define gb_Module_Module
 gb_Module_ALLMODULES += $(1)
diff --git a/solenv/gbuild/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt
index b6707eb..e2c427d 100644
--- a/solenv/gbuild/gbuild.help.txt
+++ b/solenv/gbuild/gbuild.help.txt
@@ -48,16 +48,16 @@ AVAILABLE TARGETS
                         environement set. (see gb_SIDE)
 
 INTERACTIVE VARIABLES:
-       DEBUG / debug   If not empty, build with DBGLEVEL=1 (see below).
-       ENABLE_SYMBOLS / enable_symbols
-                       If not empty, build with debugging information.
-                       Automatically enabled by DEBUG/debug.
+       DEBUG / debug   If not empty, build as with --enable-debug.
        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
                        macro.
-                       0 = no debug
-                       1 = debugging information + no optimizations
+                       0 = no debug (as with --disable-debug)
+                       1 = debugging information + no optimizations (as with --enable-debug)
+                       (Note that levels higher than 2 are used only by obsolete debugging
+                       features. Use SAL_INFO/SAL_WARN with a specific area for extra debug
+                       output in new code.)
                        2 = degugging information + no optimizations + extra
                            debug output. OSL_TRACE starts being active on this
                            level.
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 0f73a74..2bd1968 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -95,14 +95,15 @@ endif
 gb_DEBUGLEVEL := 0
 ifneq ($(strip $(DEBUG)),)
 gb_DEBUGLEVEL := 1
+# make DEBUG=true should force -g
 ifeq ($(origin DEBUG),command line)
-ENABLE_DEBUG_FOR := all
+ENABLE_DEBUGINFO_FOR := all
 endif
 endif
 ifneq ($(strip $(debug)),)
 gb_DEBUGLEVEL := 1
 ifeq ($(origin debug),command line)
-ENABLE_DEBUG_FOR := all
+ENABLE_DEBUGINFO_FOR := all
 endif
 endif
 ifeq ($(gb_PRODUCT),$(false))
@@ -112,27 +113,13 @@ endif
 ifneq ($(strip $(DBGLEVEL)),)
 gb_DEBUGLEVEL := $(strip $(DBGLEVEL))
 ifeq ($(origin DBGLEVEL),command line)
-ENABLE_DEBUG_FOR := all
+ENABLE_DEBUGINFO_FOR := all
 endif
 endif
 ifneq ($(strip $(dbglevel)),)
 gb_DEBUGLEVEL := $(strip $(dbglevel))
 ifeq ($(origin dbglevel),command line)
-ENABLE_DEBUG_FOR := all
-endif
-endif
-
-ifeq ($(or $(ENABLE_SYMBOLS),$(enable_symbols)),FALSE)
-gb_SYMBOL := $(false)
-else
-ifneq ($(strip $(ENABLE_SYMBOLS)$(enable_symbols)),)
-gb_SYMBOL := $(true)
-else
-ifneq ($(gb_DEBUGLEVEL),0)
-gb_SYMBOL := $(true)
-else
-gb_SYMBOL := $(false)
-endif
+ENABLE_DEBUGINFO_FOR := all
 endif
 endif
 
diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk
index c7d40d3..d0b653f 100644
--- a/solenv/gbuild/platform/IOS_ARM_GCC.mk
+++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk
@@ -132,13 +132,6 @@ 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 += -g
-gb_LinkTarget_CXXFLAGS += -g
-gb_LinkTarget_OBJCXXFLAGS += -g
-gb_LinkTarget_OBJCFLAGS += -g
-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 46f4e70..3563a6b 100644
--- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
@@ -117,10 +117,7 @@ gb_STDLIBS := \
 gb_LinkTarget_CFLAGS := $(gb_CFLAGS)
 gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
 
-ifeq ($(gb_SYMBOL),$(true))
-gb_LinkTarget_CXXFLAGS += $(GGDB2)
-gb_LinkTarget_CFLAGS += $(GGDB2)
-endif
+gb_DEBUG_CFLAGS := -g -fno-inline
 
 gb_LinkTarget_INCLUDE +=\
 	$(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \
diff --git a/solenv/gbuild/platform/WNT_INTEL_MSC.mk b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
index 180cb69..4b30777 100644
--- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
@@ -221,11 +221,6 @@ gb_CFLAGS+=-Zi
 gb_CXXFLAGS+=-Zi
 endif
 
-ifeq ($(gb_SYMBOL),$(true))
-gb_CFLAGS+=-Zi
-gb_CXXFLAGS+=-Zi
-endif
-
 gb_COMPILEROPTFLAGS := -Ob1 -Oxs -Oy-
 gb_COMPILERNOOPTFLAGS := -Od
 
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index c013bf5..a6cacc7 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -165,13 +165,6 @@ 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 += -g
-gb_LinkTarget_CXXFLAGS += -g
-gb_LinkTarget_OBJCFLAGS += -g
-gb_LinkTarget_OBJCXXFLAGS += -g
-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 2abac87..18c94e2 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -174,11 +174,6 @@ 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 2b06120..faf494a 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -173,11 +173,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
diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk
index b9db9fd..29e245e 100644
--- a/solenv/inc/settings.mk
+++ b/solenv/inc/settings.mk
@@ -1040,14 +1040,14 @@ CDEFS+= -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH)
 CDEFS+= -DSUPD=$(UPD)
 
 # flags to enable build with symbols; required for crashdump feature
-.IF ("$(ENABLE_CRASHDUMP)"!="" && "$(ENABLE_CRASHDUMP)"!="DUMMY") || ("$(ENABLE_SYMBOLS)"!="" && "$(ENABLE_SYMBOLS)"!="FALSE")
+.IF ("$(ENABLE_CRASHDUMP)"!="" && "$(ENABLE_CRASHDUMP)"!="DUMMY") || ("$(ENABLE_DEBUG)"!="" && "$(ENABLE_DEBUG)"!="FALSE")
 # if debug is enabled, this may enable less debug info than debug, so rely just on debug
 .IF "$(debug)" == ""
 CFLAGSENABLESYMBOLS_CC_ONLY*=$(CFLAGSENABLESYMBOLS)
 CFLAGSCXX+=$(CFLAGSENABLESYMBOLS)
 CFLAGSCC+=$(CFLAGSENABLESYMBOLS_CC_ONLY)
 .ENDIF          # "$(DEBUG)" == ""
-.ENDIF          # ("$(ENABLE_CRASHDUMP)"!="" && "$(ENABLE_CRASHDUMP)"!="DUMMY") || "$(ENABLE_SYMBOLS)"!=""
+.ENDIF          # ("$(ENABLE_CRASHDUMP)"!="" && "$(ENABLE_CRASHDUMP)"!="DUMMY") || "$(ENABLE_DEBUG)"!=""
 
 .IF "$(profile)"!=""
 CDEFS+= $(CDEFSPROF)


More information about the Libreoffice-commits mailing list