[Libreoffice-commits] .: 12 commits - config_host.mk.in configure.in filter/source oox/source sal/inc sc/source solenv/gbuild toolkit/source xmlhelp/source

Michael Stahl mst at kemper.freedesktop.org
Tue May 8 02:33:40 PDT 2012


 config_host.mk.in                                |    2 
 configure.in                                     |   48 ++++++-----
 filter/source/pdf/impdialog.cxx                  |   29 +++----
 oox/source/dump/dumperbase.cxx                   |   15 +++
 sal/inc/rtl/string.hxx                           |    5 -
 sc/source/ui/app/inputhdl.cxx                    |    3 
 solenv/gbuild/CppunitTest.mk                     |    1 
 solenv/gbuild/Executable.mk                      |    1 
 solenv/gbuild/Library.mk                         |    1 
 solenv/gbuild/LinkTarget.mk                      |   94 ++++++++---------------
 solenv/gbuild/Module.mk                          |    6 +
 solenv/gbuild/StaticLibrary.mk                   |    1 
 solenv/gbuild/gbuild.mk                          |   39 +--------
 solenv/gbuild/platform/IOS_ARM_GCC.mk            |    6 -
 solenv/gbuild/platform/WNT_INTEL_MSC.mk          |    5 -
 solenv/gbuild/platform/com_GCC_defs.mk           |    4 
 solenv/gbuild/platform/macosx.mk                 |    8 -
 solenv/gbuild/platform/solaris.mk                |    3 
 solenv/gbuild/platform/unxgcc.mk                 |    8 +
 toolkit/source/controls/tksimpleanimation.cxx    |    6 -
 toolkit/source/controls/tkthrobber.cxx           |   12 +-
 xmlhelp/source/cxxhelp/provider/urlparameter.cxx |    3 
 22 files changed, 139 insertions(+), 161 deletions(-)

New commits:
commit 98bced0d358927e462b1c2932d43b2a553bb847c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue May 8 10:59:27 2012 +0200

    oox: strict aliasing warning:
    
    /oox/source/dump/dumperbase.cxx:345:69: error: dereferencing type-punned
    pointer will break strict-aliasing rules [-Werror=strict-aliasing]

diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 093d8c1..5ad2f6a 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -340,9 +340,20 @@ void StringHelper::appendHex( OUStringBuffer& rStr, sal_Int64 nData, bool bPrefi
     appendHex( rStr, static_cast< sal_uInt64 >( nData ), bPrefix );
 }
 
+static sal_uInt64
+lcl_ConvertDouble(double const f)
+{
+    sal_uInt64 i;
+    for (size_t j = 0; j < sizeof(double); ++j)
+    {   // hopefully both endian independent and strict aliasing safe
+        reinterpret_cast<char *>(&i)[j] = reinterpret_cast<char const *>(&f)[j];
+    }
+    return i;
+}
+
 void StringHelper::appendHex( OUStringBuffer& rStr, double fData, bool bPrefix )
 {
-    appendHex( rStr, *reinterpret_cast< const sal_uInt64* >( &fData ), bPrefix );
+    appendHex( rStr, lcl_ConvertDouble(fData), bPrefix );
 }
 
 // append shortened hexadecimal -----------------------------------------------
@@ -459,7 +470,7 @@ void StringHelper::appendBin( OUStringBuffer& rStr, sal_Int64 nData, bool bDots
 
 void StringHelper::appendBin( OUStringBuffer& rStr, double fData, bool bDots )
 {
-    appendBin( rStr, *reinterpret_cast< const sal_uInt64* >( &fData ), bDots );
+    appendBin( rStr, lcl_ConvertDouble(fData), bDots );
 }
 
 // append formatted value -----------------------------------------------------
commit 3c598c4064cffdc2c9ff19e094594ca360779b66
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue May 8 10:58:02 2012 +0200

    sal: work around spurious signed overflow warnings
    
    gcc version 4.6.3 20120306 (Red Hat 4.6.3-2) (GCC):
    /rtl/string.hxx:1037:67: error: assuming signed overflow does not occur
    when assuming that (X + c) < X is always false [-Werror=strict-overflow]

diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index 0d90b53..4e76b74 100644
--- a/sal/inc/rtl/string.hxx
+++ b/sal/inc/rtl/string.hxx
@@ -1033,8 +1033,9 @@ public:
     */
     OString copy( sal_Int32 beginIndex, sal_Int32 count ) const SAL_THROW(())
     {
-        assert(beginIndex >= 0 && beginIndex <= getLength()
-               && count >= 0 && count <= getLength() - beginIndex);
+        assert(beginIndex >= 0 && beginIndex <= getLength() && count >= 0
+                && sal::static_int_cast<sal_uInt32>(count) <=
+                   sal::static_int_cast<sal_uInt32>(getLength() - beginIndex));
         if ( (beginIndex == 0) && (count == getLength()) )
             return *this;
         else
commit aea14bd0718c0eb40c02c0bc989a17096e6fa0be
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon May 7 23:34:02 2012 +0200

    work around spurious signed overflow warnings
    
    gcc version 4.6.3 20120306 (Red Hat 4.6.3-2) (GCC):
    /rtl/ustring.hxx:1293:233:
    error: assuming signed overflow does not occur when assuming that (X -
    c) > X is always false [-Werror=strict-overflow]

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 62bbe1a..ea0d830 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1406,7 +1406,8 @@ void ScInputHandler::PasteManualTip()
     //  (wenn wir mal Matrix-Konstanten haben, kann das geaendert werden)
 
     sal_Int32 nTipLen = aManualTip.getLength();
-    if ( nTipLen && ( nTipLen < 3 || aManualTip.copy( nTipLen-3 ) != "..." ) )
+    sal_uInt32 const nTipLen2(sal::static_int_cast<sal_uInt32>(nTipLen));
+    if ( nTipLen && ( nTipLen < 3 || aManualTip.copy( nTipLen2-3 ) != "..." ) )
     {
         DataChanging();                                     // kann nicht neu sein
 
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index 29bdc80..6cc30b7 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -563,7 +563,8 @@ bool URLParameter::scheme()
     if( m_aExpr.compareToAscii( "vnd.sun.star.help:///", 21 ) == 0 )
     {
         sal_Int32 nLen = m_aExpr.getLength();
-        rtl::OUString aLastStr = m_aExpr.copy( nLen - 6 );
+        rtl::OUString aLastStr =
+            m_aExpr.copy(sal::static_int_cast<sal_uInt32>(nLen) - 6);
         if( aLastStr.compareToAscii( "DbPAR=" ) == 0 )
         {
             rtl::OUString aNewExpr = m_aExpr.copy( 0, 20 );
commit b532fccca7c398a42d84fcb06deced60fa959819
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon May 7 23:25:48 2012 +0200

    work around spurious signed overflow warnings
    
    gcc version 4.6.3 20120306 (Red Hat 4.6.3-2) (GCC):
    /com/sun/star/uno/Sequence.hxx:178:10: error: assuming signed overflow
    does not occur when assuming that (X - c) > X is always false
    [-Werror=strict-overflow]

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 3b286cf..03de749 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -391,40 +391,41 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
     aRet.realloc( aRet.getLength() + nElementAdded );
 
     // add the encryption enable flag
-    aRet[ aRet.getLength() - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "Watermark" ) );
-    aRet[ aRet.getLength() - nElementAdded ].Value <<= maWatermarkText;
+    sal_uInt32 const nLength(aRet.getLength());
+    aRet[ nLength - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "Watermark" ) );
+    aRet[ nLength - nElementAdded ].Value <<= maWatermarkText;
     nElementAdded--;
 
 // add the encryption enable flag
-    aRet[ aRet.getLength() - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "EncryptFile" ) );
-    aRet[ aRet.getLength() - nElementAdded ].Value <<= mbEncrypt;
+    aRet[ nLength - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "EncryptFile" ) );
+    aRet[ nLength - nElementAdded ].Value <<= mbEncrypt;
     nElementAdded--;
 
 // add the open password
-    aRet[ aRet.getLength() - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PreparedPasswords" ) );
-    aRet[ aRet.getLength() - nElementAdded ].Value <<= mxPreparedPasswords;
+    aRet[ nLength - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PreparedPasswords" ) );
+    aRet[ nLength - nElementAdded ].Value <<= mxPreparedPasswords;
     nElementAdded--;
 
 //the restrict permission flag (needed to have the scripting consistent with the dialog)
-    aRet[ aRet.getLength() - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "RestrictPermissions" ) );
-    aRet[ aRet.getLength() - nElementAdded ].Value <<= mbRestrictPermissions;
+    aRet[ nLength - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "RestrictPermissions" ) );
+    aRet[ nLength - nElementAdded ].Value <<= mbRestrictPermissions;
     nElementAdded--;
 
 //add the permission password
-    aRet[ aRet.getLength() - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PreparedPermissionPassword" ) );
-    aRet[ aRet.getLength() - nElementAdded ].Value <<= maPreparedOwnerPassword;
+    aRet[ nLength - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PreparedPermissionPassword" ) );
+    aRet[ nLength - nElementAdded ].Value <<= maPreparedOwnerPassword;
     nElementAdded--;
 
 // this should be the last added...
     if( mbIsRangeChecked )
     {
-        aRet[ aRet.getLength() - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) );
-        aRet[ aRet.getLength() - nElementAdded ].Value <<= OUString( msPageRange );
+        aRet[ nLength - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) );
+        aRet[ nLength - nElementAdded ].Value <<= OUString( msPageRange );
     }
     else if( mbSelectionIsChecked )
     {
-        aRet[ aRet.getLength() - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "Selection" ) );
-        aRet[ aRet.getLength() - nElementAdded ].Value <<= maSelection;
+        aRet[ nLength - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "Selection" ) );
+        aRet[ nLength - nElementAdded ].Value <<= maSelection;
     }
 
     return aRet;
diff --git a/toolkit/source/controls/tksimpleanimation.cxx b/toolkit/source/controls/tksimpleanimation.cxx
index 56192b2..4661144 100644
--- a/toolkit/source/controls/tksimpleanimation.cxx
+++ b/toolkit/source/controls/tksimpleanimation.cxx
@@ -109,8 +109,10 @@ namespace toolkit
     {
         uno::Sequence< ::rtl::OUString > aServices( UnoControlModel::getSupportedServiceNames() );
         aServices.realloc( aServices.getLength() + 2 );
-        aServices[ aServices.getLength() - 2 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoSimpleAnimationControlModel );
-        aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName2_UnoSimpleAnimationControlModel );
+        aServices[sal::static_int_cast<sal_uInt32>(aServices.getLength()) - 2]
+            = ::rtl::OUString::createFromAscii( szServiceName_UnoSimpleAnimationControlModel );
+        aServices[sal::static_int_cast<sal_uInt32>(aServices.getLength()) - 1]
+            = ::rtl::OUString::createFromAscii( szServiceName2_UnoSimpleAnimationControlModel );
         return aServices;
     }
 
diff --git a/toolkit/source/controls/tkthrobber.cxx b/toolkit/source/controls/tkthrobber.cxx
index 2b27b1d..74b078e 100644
--- a/toolkit/source/controls/tkthrobber.cxx
+++ b/toolkit/source/controls/tkthrobber.cxx
@@ -107,8 +107,10 @@ namespace toolkit
     {
         uno::Sequence< ::rtl::OUString > aServices( UnoControlModel::getSupportedServiceNames() );
         aServices.realloc( aServices.getLength() + 2 );
-        aServices[ aServices.getLength() - 2 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControlModel );
-        aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName2_UnoThrobberControlModel );
+        aServices[sal::static_int_cast<sal_uInt32>(aServices.getLength()) - 2] =
+            ::rtl::OUString::createFromAscii(szServiceName_UnoThrobberControlModel);
+        aServices[sal::static_int_cast<sal_uInt32>(aServices.getLength()) - 1] =
+            ::rtl::OUString::createFromAscii(szServiceName2_UnoThrobberControlModel);
         return aServices;
     }
 
@@ -160,8 +162,10 @@ namespace toolkit
     {
         uno::Sequence< ::rtl::OUString > aServices( UnoControlBase::getSupportedServiceNames() );
         aServices.realloc( aServices.getLength() + 2 );
-        aServices[ aServices.getLength() - 2 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControl );
-        aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName2_UnoThrobberControl );
+        aServices[sal::static_int_cast<sal_uInt32>(aServices.getLength()) - 2] =
+            ::rtl::OUString::createFromAscii(szServiceName_UnoThrobberControl);
+        aServices[sal::static_int_cast<sal_uInt32>(aServices.getLength()) - 1] =
+            ::rtl::OUString::createFromAscii(szServiceName2_UnoThrobberControl);
         return aServices;
     }
 
commit a50812813de0594ac2aeb064ea4a95d66b8e4e42
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon May 7 21:33:01 2012 +0200

    gbuild: tie optimization into selective --enable-debug:
    
    Let --enable-debug determine whether optimization should be disabled,
    which works also for debug=t due to the setup in gbuild.mk.
    
    Also clean up uses of gb_COMPILEROPTFLAGS: this is now always set to
    optimization settings, and gb_COMPILERNOOPTFLAGS used in debug case,
    which should not make a difference because the only actual difference
    was that on MSVC the debug OPTFLAGS were empty, but -Od is documented as
    the default for this.

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 37949d2..4e78ce5 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -44,15 +44,15 @@ gb_LinkTarget__debug_enabled = \
 
 # debug flags, if ENABLE_DEBUG is set and the LinkTarget is named
 # in the list of libraries of ENABLE_DEBUG_FOR
-gb_LinkTarget__get_debugcflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_DEBUG_CFLAGS))
-gb_LinkTarget__get_debugcxxflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_DEBUG_CFLAGS) $(gb_DEBUG_CXXFLAGS))
+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))
 
 # 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),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_debugcflags,$(1)))
-gb_LinkTarget__get_objcflags=$(if $(OBJCFLAGS),$(OBJCFLAGS),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_debugcflags,$(1)))
-gb_LinkTarget__get_cxxflags=$(if $(CXXFLAGS),$(CXXFLAGS),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_debugcxxflags,$(1)))
-gb_LinkTarget__get_objcxxflags=$(if $(OBJCXXFLAGS),$(OBJCXXFLAGS),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_debugcxxflags,$(1)))
+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)))
 
 # Overview of dependencies and tasks of LinkTarget
 #
diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk
index 6a91c07..fbeddca 100644
--- a/solenv/gbuild/platform/IOS_ARM_GCC.mk
+++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk
@@ -127,10 +127,10 @@ endef
 
 # LinkTarget class
 
-gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_COMPILEROPTFLAGS)
+gb_LinkTarget_CFLAGS := $(gb_CFLAGS)
 gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
-gb_LinkTarget_OBJCXXFLAGS := $(gb_CXXFLAGS) $(gb_OBJCXXFLAGS) $(gb_COMPILEROPTFLAGS)
-gb_LinkTarget_OBJCFLAGS := $(gb_CFLAGS) $(gb_OBJCFLAGS) $(gb_COMPILEROPTFLAGS)
+gb_LinkTarget_OBJCXXFLAGS := $(gb_CXXFLAGS) $(gb_OBJCXXFLAGS)
+gb_LinkTarget_OBJCFLAGS := $(gb_CFLAGS) $(gb_OBJCFLAGS)
 
 ifeq ($(gb_SYMBOL),$(true))
 gb_LinkTarget_CFLAGS += -g
diff --git a/solenv/gbuild/platform/WNT_INTEL_MSC.mk b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
index d2e562c..31af240 100644
--- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
@@ -221,12 +221,7 @@ gb_CFLAGS+=-Zi
 gb_CXXFLAGS+=-Zi
 endif
 
-ifneq ($(gb_DEBUGLEVEL),0)
-gb_COMPILEROPTFLAGS :=
-else
 gb_COMPILEROPTFLAGS := -Ob1 -Oxs -Oy-
-endif
-
 gb_COMPILERNOOPTFLAGS := -Od
 
 ifeq ($(gb_FULLDEPS),$(true))
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index d84ab64..6c2a495 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -105,11 +105,7 @@ gb_LinkTarget_NOEXCEPTIONFLAGS := \
 
 
 # optimization level
-ifneq ($(gb_DEBUGLEVEL),0)
-gb_COMPILEROPTFLAGS := -O0
-else
 gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS)
-endif
 gb_COMPILERNOOPTFLAGS := -O0
 
 # Clang does not know -ggdb2 or some other options
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 3650cf1..9241cda 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -100,13 +100,7 @@ gb_LinkTarget_LDFLAGS := \
 #man ld says: obsolete	-Wl,-multiply_defined,suppress \
 
 gb_DEBUG_CFLAGS := -g
-ifneq ($(gb_DEBUGLEVEL),0)
-
-gb_COMPILEROPTFLAGS := -O0
-else
 gb_COMPILEROPTFLAGS := -O2
-endif
-
 gb_COMPILERNOOPTFLAGS := -O0
 
 # ObjCxxObject class
@@ -168,7 +162,7 @@ endef
 gb_LinkTarget_CFLAGS := $(gb_CFLAGS)
 gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
 gb_LinkTarget_OBJCXXFLAGS := $(gb_CXXFLAGS) $(gb_OBJCXXFLAGS)
-gb_LinkTarget_OBJCFLAGS := $(gb_CFLAGS) $(gb_OBJCFLAGS) $(gb_COMPILEROPTFLAGS)
+gb_LinkTarget_OBJCFLAGS := $(gb_CFLAGS) $(gb_OBJCFLAGS)
 
 ifeq ($(gb_SYMBOL),$(true))
 gb_LinkTarget_CFLAGS += -g
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 04ec93e..89a190b 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -168,15 +168,14 @@ gb_LinkTarget_LDFLAGS += \
 endif
 
 ifneq ($(gb_DEBUGLEVEL),0)
-gb_COMPILEROPTFLAGS := -O0
 gb_LINKEROPTFLAGS :=
 else
-gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS)
 gb_LINKEROPTFLAGS := -Wl,-O1
 endif
 
 gb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
 
+gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS)
 gb_COMPILERNOOPTFLAGS := -O0
 
 # LinkTarget class
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 2e793fd..443b7e5 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -168,13 +168,12 @@ gb_LinkTarget_LDFLAGS += \
 endif
 
 ifneq ($(gb_DEBUGLEVEL),0)
-gb_COMPILEROPTFLAGS := -O0
 gb_LINKEROPTFLAGS :=
 else
-gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS)
 gb_LINKEROPTFLAGS := -Wl,-O1
 endif
 
+gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS)
 gb_COMPILERNOOPTFLAGS := -O0
 
 # LinkTarget class
commit c8fa9bd8849f0503b3803465e8ce119581e11e33
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon May 7 20:58:44 2012 +0200

    dis-entangle --enable-symbols and --enable-debug:
    
    OOo used to use debug level this way:
    0 is default for product build
    1 for --enable-dbgutil
    2 for environment variable debug=t, regardless of dbgutil setting
    in LO these have now morphed into:
    0 is default for product build
    1 for environment variable debug=t
    2 for --enable-dbgutil (at some intermediate stage in the past)
    1 for --enable-dbgutil (today)
    
    This has caused a lot of confusion and some things were not converted
    properly, including a check in LinkTarget.mk.
    
    Developers should use --enable-debug to get useful information,
    including full debug info and assertions.
    
    --enable-symbols is not intended for developers, but for people
    who need their builds to be able to produce useful stack traces;
    --enable-symbols is for example set unconditionally in the Fedora RPM
    spec, and for this purpose disabling of inlining is not wanted.
    It is unlikely that somebody wants symbols for only part of the build,
    and consequently a different mechanism is used to set the corresponding
    flags: they are set into global gb_LinkTarget_C{,XX}FLAGS.
    
    So move the selective symbol feature back to --enable-debug.
    
    (this substantially reverts db8df57acd601ed084bd0122683e1bd066a4f143)

diff --git a/config_host.mk.in b/config_host.mk.in
index 65affa9..d4a5ea6 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -99,6 +99,7 @@ export DYNAMIC_CRT=@DYNAMIC_CRT@
 export ENABLE_CAIRO_CANVAS=@ENABLE_CAIRO_CANVAS@
 export ENABLE_CRASHDUMP=@ENABLE_CRASHDUMP@
 export ENABLE_DBUS=@ENABLE_DBUS@
+export ENABLE_DEBUG_FOR=@ENABLE_DEBUG_FOR@
 export ENABLE_DIRECTX=@ENABLE_DIRECTX@
 export ENABLE_EVOAB2=@ENABLE_EVOAB2@
 export ENABLE_GCONF=@ENABLE_GCONF@
@@ -135,7 +136,6 @@ 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_FOR=@ENABLE_SYMBOLS_FOR@
 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 43a6544..750899b 100644
--- a/configure.in
+++ b/configure.in
@@ -610,12 +610,8 @@ AC_ARG_ENABLE(atl,
 AC_ARG_ENABLE(symbols,
     AS_HELP_STRING([--enable-symbols],
         [Include debugging symbols in output. WARNING - a complete build needs
-         a lot of space (roughly 10 GiB) and takes much longer (enables -g compiler flag).
-         You can also use this switch as follows:
-         --enable-symbols="all -sw/ -Library_sc" to enable symbols 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 and removal disabling takes precedence).]),
+         a lot of space (roughly 10 GiB) and takes much longer (enables -g
+         compiler flag for GCC or equivalent).]),
 ,)
 
 AC_ARG_ENABLE(werror,
@@ -626,15 +622,25 @@ AC_ARG_ENABLE(werror,
 
 AC_ARG_ENABLE(debug,
     AS_HELP_STRING([--enable-debug],
-        [Include debugging symbols from --enable-symbols plus extra debugging
-         code. Extra large build! (enables -g compiler flag and dmake debug=true)
+        [Include debugging symbols 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".]))
+         "build -- debug=true dbglevel=2".
+         You can also use this switch as follows:
+         --enable-debug="all -sw/ -Library_sc" to enable symbols 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).]))
 
 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]))
+         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-dgbutil and a --disalbe-dbgutil build.]))
 
 AC_ARG_ENABLE(linkoo,
     AS_HELP_STRING([--disable-linkoo],
@@ -3529,13 +3535,23 @@ 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
-    ENABLE_DEBUG="TRUE"
+    if test "$enable_debug" = "y" || test "$enable_debug" = "yes"; then
+        ENABLE_DEBUG="TRUE"
+        ENABLE_DEBUG_FOR=all
+        AC_MSG_RESULT([yes])
+    else
+        ENABLE_DEBUG=""
+        ENABLE_DEBUG_FOR="$enable_debug"
+        AC_MSG_RESULT([for $enable_debug])
+    fi
     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 Determine whether to use linkoo for the smoketest installation
@@ -3567,20 +3583,12 @@ dnl ===================================================================
 AC_MSG_CHECKING([whether to include symbols])
 if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then
     ENABLE_SYMBOLS="TRUE"
-    if test "$enable_symbols" = "y" || test "$enable_symbols" = "yes"; then
-        ENABLE_SYMBOLS_FOR=all
-        AC_MSG_RESULT([yes])
-    else
-        ENABLE_SYMBOLS_FOR="$enable_symbols"
-        AC_MSG_RESULT([for $enable_symbols])
-    fi
+    AC_MSG_RESULT([yes])
 else
     ENABLE_SYMBOLS=
-    ENABLE_SYMBOLS_FOR=
     AC_MSG_RESULT([no])
 fi
 AC_SUBST(ENABLE_SYMBOLS)
-AC_SUBST(ENABLE_SYMBOLS_FOR)
 
 if test "$enable_headless" = "yes"; then
     # be sure to do not mess with uneeded stuff
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 5d25615..37949d2 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -37,27 +37,22 @@
 # LDFLAGS
 
 # enable if: no "-TARGET" defined AND [module is enabled OR "TARGET" defined]
-gb_LinkTarget__symbols_enabled = \
- $(and $(if $(filter -$(1),$(ENABLE_SYMBOLS_FOR)),,$(true)),\
+gb_LinkTarget__debug_enabled = \
+ $(and $(if $(filter -$(1),$(ENABLE_DEBUG_FOR)),,$(true)),\
        $(or $(gb_Module_CURRENTMODULE_DEBUG_ENABLED),\
-            $(filter $(1),$(ENABLE_SYMBOLS_FOR))))
+            $(filter $(1),$(ENABLE_DEBUG_FOR))))
 
-# debug flags, if ENABLE_SYMBOLS is set and the LinkTarget is named
-# in the list of libraries of ENABLE_SYMBOLS_FOR
-ifeq ($(gb_SYMBOL),$(true))
-gb_LinkTarget__get_symbolscflags=$(if $(call gb_LinkTarget__symbols_enabled,$(1)),$(gb_DEBUG_CFLAGS))
-gb_LinkTarget__get_symbolscxxflags=$(if $(call gb_LinkTarget__symbols_enabled,$(1)),$(gb_DEBUG_CFLAGS) $(gb_DEBUG_CXXFLAGS))
-else
-gb_LinkTarget__get_symbolscflags=
-gb_LinkTarget__get_symbolscxxflags=
-endif
+# debug flags, if ENABLE_DEBUG is set and the LinkTarget is named
+# in the list of libraries of ENABLE_DEBUG_FOR
+gb_LinkTarget__get_debugcflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_DEBUG_CFLAGS))
+gb_LinkTarget__get_debugcxxflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_DEBUG_CFLAGS) $(gb_DEBUG_CXXFLAGS))
 
 # 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),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_symbolscflags,$(1)))
-gb_LinkTarget__get_objcflags=$(if $(OBJCFLAGS),$(OBJCFLAGS),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_symbolscflags,$(1)))
-gb_LinkTarget__get_cxxflags=$(if $(CXXFLAGS),$(CXXFLAGS),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_symbolscxxflags,$(1)))
-gb_LinkTarget__get_objcxxflags=$(if $(OBJCXXFLAGS),$(OBJCXXFLAGS),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_symbolscxxflags,$(1)))
+gb_LinkTarget__get_cflags=$(if $(CFLAGS),$(CFLAGS),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_debugcflags,$(1)))
+gb_LinkTarget__get_objcflags=$(if $(OBJCFLAGS),$(OBJCFLAGS),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_debugcflags,$(1)))
+gb_LinkTarget__get_cxxflags=$(if $(CXXFLAGS),$(CXXFLAGS),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_debugcxxflags,$(1)))
+gb_LinkTarget__get_objcxxflags=$(if $(OBJCXXFLAGS),$(OBJCXXFLAGS),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_debugcxxflags,$(1)))
 
 # Overview of dependencies and tasks of LinkTarget
 #
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index 486a2fe..e5f87f0 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -180,8 +180,8 @@ showmodules :
 
 # enable if: no "-MODULE/" defined AND ["all" defined OR "MODULE/" defined]
 gb_Module__debug_enabled = \
- $(and $(if $(filter -$(1)/,$(ENABLE_SYMBOLS_FOR)),,$(true)),\
-       $(filter all $(1)/,$(ENABLE_SYMBOLS_FOR)))
+ $(and $(if $(filter -$(1)/,$(ENABLE_DEBUG_FOR)),,$(true)),\
+       $(filter all $(1)/,$(ENABLE_DEBUG_FOR)))
 
 define gb_Module_Module
 gb_Module_ALLMODULES += $(1)
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 9d3ed3a..1457f3d 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -79,19 +79,10 @@ else
 gb_PRODUCT := $(false)
 endif
 
-gb_SYMBOL := $(false)
-ifneq ($(strip $(ENABLE_SYMBOLS)),)
+ifneq ($(strip $(ENABLE_SYMBOLS)$(enable_symbols)),)
 gb_SYMBOL := $(true)
-# make sure symbols are enabled if overriden using the command line
-ifeq ($(origin ENABLE_SYMBOLS),command line)
-ENABLE_SYMBOLS_FOR = all
-endif
-endif
-ifneq ($(strip $(enable_symbols)),)
-gb_SYMBOL := $(true)
-ifeq ($(origin enable_symbols),command line)
-ENABLE_SYMBOLS_FOR = all
-endif
+else
+gb_SYMBOL := $(false)
 endif
 
 gb_TIMELOG := 0
@@ -103,13 +94,13 @@ gb_DEBUGLEVEL := 0
 ifneq ($(strip $(DEBUG)),)
 gb_DEBUGLEVEL := 1
 ifeq ($(origin DEBUG),command line)
-ENABLE_SYMBOLS_FOR = all
+ENABLE_DEBUG_FOR := all
 endif
 endif
 ifneq ($(strip $(debug)),)
 gb_DEBUGLEVEL := 1
 ifeq ($(origin debug),command line)
-ENABLE_SYMBOLS_FOR = all
+ENABLE_DEBUG_FOR := all
 endif
 endif
 ifeq ($(gb_PRODUCT),$(false))
@@ -119,13 +110,13 @@ endif
 ifneq ($(strip $(DBGLEVEL)),)
 gb_DEBUGLEVEL := $(strip $(DBGLEVEL))
 ifeq ($(origin DBGLEVEL),command line)
-ENABLE_SYMBOLS_FOR = all
+ENABLE_DEBUG_FOR := all
 endif
 endif
 ifneq ($(strip $(dbglevel)),)
 gb_DEBUGLEVEL := $(strip $(dbglevel))
 ifeq ($(origin dbglevel),command line)
-ENABLE_SYMBOLS_FOR = all
+ENABLE_DEBUG_FOR := all
 endif
 endif
 
@@ -133,14 +124,6 @@ ifneq ($(gb_DEBUGLEVEL),0)
 gb_SYMBOL := $(true)
 endif
 
-# if symbols are triggered by something else than --enable-symbols,
-# make sure they are actually enabled
-ifeq ($(gb_SYMBOL),$(true))
-ifeq ($(ENABLE_SYMBOLS_FOR),)
-ENABLE_SYMBOLS_FOR = all
-endif
-endif
-
 ifneq ($(nodep),)
 gb_FULLDEPS := $(false)
 else
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 89665d6..2e793fd 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -194,6 +194,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
commit ae17a1966d58faaa7350a85f7e91f16ee3fd1fb5
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon May 7 18:29:52 2012 +0200

    gbuild: add CFLAGS to generated C objects as well
    
    (was broken by ebed42c38ae91147633c47873307e07984bc62c1)

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index f5b5a08..5d25615 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -839,7 +839,7 @@ $(call gb_LinkTarget_get_clean_target,$(1)) : GENCOBJECTS += $(2)
 $(call gb_GenCObject_get_source,$(2)) : | $(gb_Helper_MISCDUMMY)
 $(call gb_LinkTarget_get_target,$(1)) : $(call gb_GenCObject_get_target,$(2))
 $(call gb_GenCObject_get_target,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1))
-$(call gb_GenCObject_get_target,$(2)) : T_CFLAGS += $(3)
+$(call gb_GenCObject_get_target,$(2)) : T_CFLAGS += $(call gb_LinkTarget__get_cflags,$(4)) $(3)
 $(call gb_GenCObject_get_target,$(2)) : \
 	OBJECTOWNER := $(call gb_Object__owner,$(2),$(1))
 
@@ -987,7 +987,7 @@ $(foreach obj,$(2),$(eval $(call gb_GenCxxObject_get_target,$(obj)) : CXXOBJECT_
 endef
 
 define gb_LinkTarget_add_generated_cobjects
-$(foreach obj,$(2),$(call gb_LinkTarget_add_generated_c_object,$(1),$(obj),$(3)))
+$(foreach obj,$(2),$(call gb_LinkTarget_add_generated_c_object,$(1),$(obj),$(3),$(4)))
 endef
 
 define gb_LinkTarget_add_generated_cxxobjects
commit e7a3d1a289d618e8ebfdebfa986d62ede189df6c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon May 7 18:02:23 2012 +0200

    gbuild: selective symbols for Objective C(++)

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 59d69fc..f5b5a08 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -55,7 +55,9 @@ endif
 # 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),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_symbolscflags,$(1)))
+gb_LinkTarget__get_objcflags=$(if $(OBJCFLAGS),$(OBJCFLAGS),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_symbolscflags,$(1)))
 gb_LinkTarget__get_cxxflags=$(if $(CXXFLAGS),$(CXXFLAGS),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_symbolscxxflags,$(1)))
+gb_LinkTarget__get_objcxxflags=$(if $(OBJCXXFLAGS),$(OBJCXXFLAGS),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_symbolscxxflags,$(1)))
 
 # Overview of dependencies and tasks of LinkTarget
 #
@@ -473,7 +475,7 @@ $(call gb_LinkTarget_get_target,$(1)) : T_CFLAGS := $$(gb_LinkTarget_CFLAGS)
 $(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : T_CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS)
 $(call gb_LinkTarget_get_target,$(1)) : T_OBJCXXFLAGS := $$(gb_LinkTarget_OBJCXXFLAGS)
-$(call gb_LinkTarget_get_target,$(1)) : T_OBJCFLAGS := $$(gb_LinkTarget_OBJCFLAGS) $(OBJCFLAGS)
+$(call gb_LinkTarget_get_target,$(1)) : T_OBJCFLAGS := $$(gb_LinkTarget_OBJCFLAGS)
 $(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : DEFS := $$(gb_LinkTarget_DEFAULTDEFS) $(CPPFLAGS)
 $(call gb_LinkTarget_get_headers_target,$(1)) \
@@ -504,8 +506,8 @@ $(call gb_LinkTarget_get_dep_target,$(1)) : GENCXXOBJECTS :=
 $(call gb_LinkTarget_get_dep_target,$(1)) : YACCOBJECTS :=
 $(call gb_LinkTarget_get_dep_target,$(1)) : T_CFLAGS := $$(gb_LinkTarget_CFLAGS)
 $(call gb_LinkTarget_get_dep_target,$(1)) : T_CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS)
-$(call gb_LinkTarget_get_dep_target,$(1)) : T_OBJCXXFLAGS := $$(gb_LinkTarget_OBJCXXFLAGS) $(OBJCXXFLAGS)
-$(call gb_LinkTarget_get_dep_target,$(1)) : T_OBJCFLAGS := $$(gb_LinkTarget_OBJCFLAGS) $(OBJCFLAGS)
+$(call gb_LinkTarget_get_dep_target,$(1)) : T_OBJCXXFLAGS := $$(gb_LinkTarget_OBJCXXFLAGS)
+$(call gb_LinkTarget_get_dep_target,$(1)) : T_OBJCFLAGS := $$(gb_LinkTarget_OBJCFLAGS)
 $(call gb_LinkTarget_get_dep_target,$(1)) : T_YACCFLAGS := $$(gb_LinkTarget_YYACFLAGS) $(YACCFLAGS)
 $(call gb_LinkTarget_get_dep_target,$(1)) : DEFS := $$(gb_LinkTarget_DEFAULTDEFS) $(CPPFLAGS)
 $(call gb_LinkTarget_get_dep_target,$(1)) : INCLUDE := $$(gb_LinkTarget_INCLUDE)
@@ -782,7 +784,7 @@ $(call gb_LinkTarget_get_clean_target,$(1)) : OBJCOBJECTS += $(2)
 
 $(call gb_LinkTarget_get_target,$(1)) : $(call gb_ObjCObject_get_target,$(2))
 $(call gb_ObjCObject_get_target,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1))
-$(call gb_ObjCObject_get_target,$(2)) : T_OBJCFLAGS += $(3)
+$(call gb_ObjCObject_get_target,$(2)) : T_OBJCFLAGS += $(call gb_LinkTarget__get_objcflags,$(4)) $(3)
 $(call gb_ObjCObject_get_target,$(2)) : \
 	OBJECTOWNER := $(call gb_Object__owner,$(2),$(1))
 
@@ -800,7 +802,7 @@ $(call gb_LinkTarget_get_clean_target,$(1)) : OBJCXXOBJECTS += $(2)
 
 $(call gb_LinkTarget_get_target,$(1)) : $(call gb_ObjCxxObject_get_target,$(2))
 $(call gb_ObjCxxObject_get_target,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1))
-$(call gb_ObjCxxObject_get_target,$(2)) : T_OBJCXXFLAGS += $(3)
+$(call gb_ObjCxxObject_get_target,$(2)) : T_OBJCXXFLAGS += $(call gb_LinkTarget__get_objcxxflags,$(4)) $(3)
 $(call gb_ObjCxxObject_get_target,$(2)) : \
 	OBJECTOWNER := $(call gb_Object__owner,$(2),$(1))
 
@@ -959,11 +961,11 @@ $(foreach obj,$(2),$(call gb_LinkTarget_add_cxxobject,$(1),$(obj),$(3)))
 endef
 
 define gb_LinkTarget_add_objcobjects
-$(foreach obj,$(2),$(call gb_LinkTarget_add_objcobject,$(1),$(obj),$(3)))
+$(foreach obj,$(2),$(call gb_LinkTarget_add_objcobject,$(1),$(obj),$(3),$(4)))
 endef
 
 define gb_LinkTarget_add_objcxxobjects
-$(foreach obj,$(2),$(call gb_LinkTarget_add_objcxxobject,$(1),$(obj),$(3)))
+$(foreach obj,$(2),$(call gb_LinkTarget_add_objcxxobject,$(1),$(obj),$(3),$(4)))
 endef
 
 define gb_LinkTarget_add_asmobjects
commit 8c1c2472dfb87e28b63328cdb7a3198e2cae5164
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon May 7 18:02:06 2012 +0200

    gbuild: replace gb_LinkTarget_set_objcflags with add_objcflags

diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 3c9cd82..94582a8 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -342,6 +342,7 @@ $(eval $(foreach method,\
 	set_cflags \
 	add_cxxflags \
 	set_yaccflags \
+	add_objcflags \
 	add_objcxxflags \
 	add_defs \
 	set_defs \
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index 2cb23fc..a89676e 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -96,6 +96,7 @@ $(eval $(foreach method,\
 	set_cflags \
 	add_cxxflags \
 	set_cxxflags \
+	add_objcflags \
 	add_objcxxflags \
 	set_objcflags \
 	set_objcxxflags \
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index 2c74d6e..3197265 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -174,6 +174,7 @@ $(eval $(foreach method,\
 	add_cxxflags \
 	set_cxxflags \
 	add_objcxxflags \
+	add_objcflags \
 	set_objcflags \
 	set_objcxxflags \
 	add_defs \
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 7d126fd..59d69fc 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -576,9 +576,15 @@ $$(call gb_Output_error,\
 endef
 
 define gb_LinkTarget_set_objcflags
-$(call gb_LinkTarget_get_target,$(1)) : T_OBJCFLAGS := $(2)
+$$(call gb_Output_error,\
+ gb_LinkTarget_set_objcflags: use gb_LinkTarget_add_objcflags instead.)
+
+endef
+
+define gb_LinkTarget_add_objcflags
+$(call gb_LinkTarget_get_target,$(1)) : T_OBJCFLAGS += $(2)
 ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_LinkTarget_get_dep_target,$(1)) : T_OBJCFLAGS := $(2)
+$(call gb_LinkTarget_get_dep_target,$(1)) : T_OBJCFLAGS += $(2)
 endif
 
 endef
diff --git a/solenv/gbuild/StaticLibrary.mk b/solenv/gbuild/StaticLibrary.mk
index 9179958..7315258 100644
--- a/solenv/gbuild/StaticLibrary.mk
+++ b/solenv/gbuild/StaticLibrary.mk
@@ -97,6 +97,7 @@ $(eval $(foreach method,\
 	set_cflags \
 	add_cxxflags \
 	set_cxxflags \
+	add_objcflags \
 	add_objcxxflags \
 	set_objcxxflags \
 	add_defs \
commit a149454c79b62c4bf1c87db44138d27b4bcdab77
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon May 7 17:13:26 2012 +0200

    gbuild: fix CFLAGS/CXXFLAGS:
    
    GNU coding standards say that user should be able to override the build
    system's default flags with CFLAGS/CXXFLAGS environment vars;
    also these ended up twice on the command line due to historic accident.

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index b71a13b..7d126fd 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -52,9 +52,10 @@ gb_LinkTarget__get_symbolscflags=
 gb_LinkTarget__get_symbolscxxflags=
 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)
+# 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),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_symbolscflags,$(1)))
+gb_LinkTarget__get_cxxflags=$(if $(CXXFLAGS),$(CXXFLAGS),$(gb_COMPILEROPTFLAGS) $(call gb_LinkTarget__get_symbolscxxflags,$(1)))
 
 # Overview of dependencies and tasks of LinkTarget
 #
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 8403685..9d3ed3a 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -153,22 +153,14 @@ endif
 endif
 
 # save user-supplied flags for latter use
-ifneq ($(strip $(CFLAGS)),)
-gb__ENV_CFLAGS := $(CFLAGS)
-else
 # TODO remove after the old build system is abolished
 ifneq ($(strip $(ENVCFLAGS)),)
 gb__ENV_CFLAGS := $(ENVCFLAGS)
 endif
-endif
-ifneq ($(strip $(CXXFLAGS)),)
-gb__ENV_CXXFLAGS := $(CXXFLAGS)
-else
 # TODO remove after the old build system is abolished
 ifneq ($(strip $(ENVCFLAGSCXX)),)
 gb__ENV_CXXFLAGS := $(ENVCFLAGSCXX)
 endif
-endif
 
 include $(GBUILDDIR)/Helper.mk
 include $(GBUILDDIR)/TargetLocations.mk
commit 0cd589cb5f57242b320530920db33b720110d619
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon May 7 16:25:04 2012 +0200

    gbuild: refactor selective symbols again:
    
    The previous commit works but results in a ~0.4 second slowdown on
    tail_build, which is completely unacceptable; seems that at the cost of
    another ugly global variable in Module.mk we can get the performance back
    and then some, so refactor this again...

diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 09a1db1..3c9cd82 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -123,7 +123,7 @@ $(call gb_CppunitTest_get_target,$(1)) : UNO_SERVICES :=
 $(call gb_CppunitTest_get_target,$(1)) : UNO_TYPES :=
 $(call gb_CppunitTest_get_target,$(1)) : DBGSV_ERROR_OUT := shell
 $(call gb_CppunitTest_get_target,$(1)) : SAL_DIAGNOSE_ABORT :=
-$$(eval $$(call gb_Module_register_target,$(call gb_CppunitTest_get_target,$(1)),$(call gb_CppunitTest_get_clean_target,$(1)),CppunitTest_$(1)))
+$$(eval $$(call gb_Module_register_target,$(call gb_CppunitTest_get_target,$(1)),$(call gb_CppunitTest_get_clean_target,$(1))))
 
 endef
 
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index eda569c..2cb23fc 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -59,7 +59,7 @@ $(call gb_Executable_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2)) \
 	| $(dir $(call gb_Executable_get_target,$(1))).dir
 $(call gb_Executable_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2))
 $(call gb_Executable_Executable_platform,$(1),$(2))
-$$(eval $$(call gb_Module_register_target,$(call gb_Executable_get_target,$(1)),$(call gb_Executable_get_clean_target,$(1)),Executable_$(1)))
+$$(eval $$(call gb_Module_register_target,$(call gb_Executable_get_target,$(1)),$(call gb_Executable_get_clean_target,$(1))))
 $(call gb_Deliver_add_deliverable,$(call gb_Executable_get_target,$(1)),$(call gb_LinkTarget_get_target,$(2)),$(1))
 
 endef
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index 3a1e3d9..2c74d6e 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -75,7 +75,7 @@ $(call gb_Library__get_final_target,$(1)) : $(call gb_Library_get_target,$(1))
 $(call gb_Library_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2))
 $(call gb_Library_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2))
 $(call gb_Library_Library_platform,$(1),$(2),$(gb_Library_DLLDIR)/$(call gb_Library_get_dllname,$(1)))
-$$(eval $$(call gb_Module_register_target,$(call gb_Library__get_final_target,$(1)),$(call gb_Library_get_clean_target,$(1)),Library_$(1)))
+$$(eval $$(call gb_Module_register_target,$(call gb_Library__get_final_target,$(1)),$(call gb_Library_get_clean_target,$(1))))
 $(call gb_Deliver_add_deliverable,$(call gb_Library_get_target,$(1)),$(call gb_LinkTarget_get_target,$(2)),$(1))
 
 endef
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index e851dd5..b71a13b 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -36,46 +36,17 @@
 # OBJCXXFLAGS
 # LDFLAGS
 
-
-# convert ENABLE_SYMBOLS_FOR from "all -sc/" syntax to a list of target names
-
-# all targets
-gb_Symbols_get_all = \
- $(foreach module,$(gb_Module_ALLMODULES),$(gb_Module_DEBUG_$(module)))
-
-# all targets in a module
-gb_Symbols_expand_module = $(gb_Module_DEBUG_$(1))
-
-# expand one item: all->all targets, foo/ -> all targets in foo/, otherwise the item itself
-define gb_Symbols_expand_item
-$(if $(filter all,$(1)),$(call gb_Symbols_get_all),
-    $(if $(findstring /,$(1)),$(call gb_Symbols_expand_module,$(1)),
-        $(if $(findstring _,$(1)),$(1),
-            $(error no _ or / in --enable-debug item, prepend target type such as Library_ or append / for directory))))
-endef
-
-# list of items to enable debug for
-define gb_Symbols_expand_debug
-$(foreach item,$(1),$(if $(findstring -,$(item)),,$(call gb_Symbols_expand_item,$(item))))
-endef
-
-# list of items to not enable debug for
-define gb_Symbols_expand_nodebug
-$(foreach item,$(1),$(if $(findstring -,$(item)),$(call gb_Symbols_expand_item,$(patsubst -%,%,$(item))),))
-endef
-
-# add items to enable debug for, remove items to not enable debug for
-# note that there is not ordering and removing takes precedence
-gb_Symbols_create_debugfor=$(filter-out $(call gb_Symbols_expand_nodebug,$(1)),$(call gb_Symbols_expand_debug,$(1)))
-
-# convert the value
-gb_ENABLE_SYMBOLS_FOR=$(call gb_Symbols_create_debugfor,$(ENABLE_SYMBOLS_FOR))
+# enable if: no "-TARGET" defined AND [module is enabled OR "TARGET" defined]
+gb_LinkTarget__symbols_enabled = \
+ $(and $(if $(filter -$(1),$(ENABLE_SYMBOLS_FOR)),,$(true)),\
+       $(or $(gb_Module_CURRENTMODULE_DEBUG_ENABLED),\
+            $(filter $(1),$(ENABLE_SYMBOLS_FOR))))
 
 # debug flags, if ENABLE_SYMBOLS is set and the LinkTarget is named
 # in the list of libraries of ENABLE_SYMBOLS_FOR
 ifeq ($(gb_SYMBOL),$(true))
-gb_LinkTarget__get_symbolscflags=$(if $(filter $(1),$(gb_ENABLE_SYMBOLS_FOR)),$(gb_DEBUG_CFLAGS))
-gb_LinkTarget__get_symbolscxxflags=$(if $(filter $(1),$(gb_ENABLE_SYMBOLS_FOR)),$(gb_DEBUG_CFLAGS) $(gb_DEBUG_CXXFLAGS))
+gb_LinkTarget__get_symbolscflags=$(if $(call gb_LinkTarget__symbols_enabled,$(1)),$(gb_DEBUG_CFLAGS))
+gb_LinkTarget__get_symbolscxxflags=$(if $(call gb_LinkTarget__symbols_enabled,$(1)),$(gb_DEBUG_CFLAGS) $(gb_DEBUG_CXXFLAGS))
 else
 gb_LinkTarget__get_symbolscflags=
 gb_LinkTarget__get_symbolscxxflags=
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index 6e9f8b0..486a2fe 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -178,6 +178,11 @@ showmodules :
 	$(info $(strip $(gb_Module_ALLMODULES)))
 	@true 
 
+# enable if: no "-MODULE/" defined AND ["all" defined OR "MODULE/" defined]
+gb_Module__debug_enabled = \
+ $(and $(if $(filter -$(1)/,$(ENABLE_SYMBOLS_FOR)),,$(true)),\
+       $(filter all $(1)/,$(ENABLE_SYMBOLS_FOR)))
+
 define gb_Module_Module
 gb_Module_ALLMODULES += $(1)
 gb_Module_MODULELOCATIONS += $(1):$(dir $(realpath $(lastword $(MAKEFILE_LIST))))
@@ -186,6 +191,7 @@ gb_Module_CHECKTARGETSTACK := $(call gb_Module_get_check_target,$(1)) $(gb_Modul
 gb_Module_SLOWCHECKTARGETSTACK := $(call gb_Module_get_slowcheck_target,$(1)) $(gb_Module_SLOWCHECKTARGETSTACK)
 gb_Module_SUBSEQUENTCHECKTARGETSTACK := $(call gb_Module_get_subsequentcheck_target,$(1)) $(gb_Module_SUBSEQUENTCHECKTARGETSTACK)
 gb_Module_CLEANTARGETSTACK := $(call gb_Module_get_clean_target,$(1)) $(gb_Module_CLEANTARGETSTACK)
+gb_Module_CURRENTMODULE_DEBUG_ENABLED := $(call gb_Module__debug_enabled,$(1))
 
 endef
 
@@ -196,7 +202,6 @@ endef
 define gb_Module_register_target
 gb_Module_CURRENTTARGET := $(1)
 gb_Module_CURRENTCLEANTARGET := $(2)
-gb_Module_DEBUG_$(gb_Module_CURRENTMODULE) += $(3)
 
 endef
 
@@ -204,7 +209,6 @@ endef
 define gb_Module__read_targetfile
 gb_Module_CURRENTTARGET :=
 gb_Module_CURRENTCLEANTARGET :=
-gb_Module_CURRENTMODULE := $(1)
 include $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS)))$(2).mk
 ifneq ($$(words $$(gb_Module_CURRENTTARGET)) $$(words $$(gb_Module_CURRENTCLEANTARGET)),1 1)
 $$(eval $$(call gb_Output_error,No $(3) registered while reading $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS)))$(2).mk!))
diff --git a/solenv/gbuild/StaticLibrary.mk b/solenv/gbuild/StaticLibrary.mk
index db93eea..9179958 100644
--- a/solenv/gbuild/StaticLibrary.mk
+++ b/solenv/gbuild/StaticLibrary.mk
@@ -69,7 +69,7 @@ $(call gb_LinkTarget_add_defs,$(2),\
 $(call gb_StaticLibrary_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2))
 $(call gb_StaticLibrary_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2))
 $(call gb_StaticLibrary_StaticLibrary_platform,$(1),$(2))
-$$(eval $$(call gb_Module_register_target,$(call gb_StaticLibrary_get_target,$(1)),$(call gb_StaticLibrary_get_clean_target,$(1)),StaticLibrary_$(1)))
+$$(eval $$(call gb_Module_register_target,$(call gb_StaticLibrary_get_target,$(1)),$(call gb_StaticLibrary_get_clean_target,$(1))))
 $(call gb_Deliver_add_deliverable,$(call gb_StaticLibrary_get_target,$(1)),$(call gb_LinkTarget_get_target,$(2)),$(1))
 
 endef
commit d827219092063c6c4d045463b41fef2c0fc17c10
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon May 7 14:12:50 2012 +0200

    gbuild: refactor the selective symbols support
    
    so it doesn't use wildcard but instead the actually registered
    LinkTargets.

diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 3c9cd82..09a1db1 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -123,7 +123,7 @@ $(call gb_CppunitTest_get_target,$(1)) : UNO_SERVICES :=
 $(call gb_CppunitTest_get_target,$(1)) : UNO_TYPES :=
 $(call gb_CppunitTest_get_target,$(1)) : DBGSV_ERROR_OUT := shell
 $(call gb_CppunitTest_get_target,$(1)) : SAL_DIAGNOSE_ABORT :=
-$$(eval $$(call gb_Module_register_target,$(call gb_CppunitTest_get_target,$(1)),$(call gb_CppunitTest_get_clean_target,$(1))))
+$$(eval $$(call gb_Module_register_target,$(call gb_CppunitTest_get_target,$(1)),$(call gb_CppunitTest_get_clean_target,$(1)),CppunitTest_$(1)))
 
 endef
 
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index 2cb23fc..eda569c 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -59,7 +59,7 @@ $(call gb_Executable_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2)) \
 	| $(dir $(call gb_Executable_get_target,$(1))).dir
 $(call gb_Executable_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2))
 $(call gb_Executable_Executable_platform,$(1),$(2))
-$$(eval $$(call gb_Module_register_target,$(call gb_Executable_get_target,$(1)),$(call gb_Executable_get_clean_target,$(1))))
+$$(eval $$(call gb_Module_register_target,$(call gb_Executable_get_target,$(1)),$(call gb_Executable_get_clean_target,$(1)),Executable_$(1)))
 $(call gb_Deliver_add_deliverable,$(call gb_Executable_get_target,$(1)),$(call gb_LinkTarget_get_target,$(2)),$(1))
 
 endef
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index 2c74d6e..3a1e3d9 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -75,7 +75,7 @@ $(call gb_Library__get_final_target,$(1)) : $(call gb_Library_get_target,$(1))
 $(call gb_Library_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2))
 $(call gb_Library_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2))
 $(call gb_Library_Library_platform,$(1),$(2),$(gb_Library_DLLDIR)/$(call gb_Library_get_dllname,$(1)))
-$$(eval $$(call gb_Module_register_target,$(call gb_Library__get_final_target,$(1)),$(call gb_Library_get_clean_target,$(1))))
+$$(eval $$(call gb_Module_register_target,$(call gb_Library__get_final_target,$(1)),$(call gb_Library_get_clean_target,$(1)),Library_$(1)))
 $(call gb_Deliver_add_deliverable,$(call gb_Library_get_target,$(1)),$(call gb_LinkTarget_get_target,$(2)),$(1))
 
 endef
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index c412d57..e851dd5 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -40,15 +40,16 @@
 # convert ENABLE_SYMBOLS_FOR from "all -sc/" syntax to a list of target names
 
 # all targets
-gb_Symbols_get_all=$(foreach item,$(wildcard $(SRCDIR)/*/*.mk),$(basename $(notdir $(item))))
+gb_Symbols_get_all = \
+ $(foreach module,$(gb_Module_ALLMODULES),$(gb_Module_DEBUG_$(module)))
 
-# all targets in a dir
-gb_Symbols_expand_dir=$(foreach item,$(wildcard $(SRCDIR)/$(1)/*.mk),$(basename $(notdir $(item))))
+# all targets in a module
+gb_Symbols_expand_module = $(gb_Module_DEBUG_$(1))
 
 # expand one item: all->all targets, foo/ -> all targets in foo/, otherwise the item itself
 define gb_Symbols_expand_item
 $(if $(filter all,$(1)),$(call gb_Symbols_get_all),
-    $(if $(findstring /,$(1)),$(call gb_Symbols_expand_dir,$(1)),
+    $(if $(findstring /,$(1)),$(call gb_Symbols_expand_module,$(1)),
         $(if $(findstring _,$(1)),$(1),
             $(error no _ or / in --enable-debug item, prepend target type such as Library_ or append / for directory))))
 endef
@@ -68,7 +69,7 @@ endef
 gb_Symbols_create_debugfor=$(filter-out $(call gb_Symbols_expand_nodebug,$(1)),$(call gb_Symbols_expand_debug,$(1)))
 
 # convert the value
-gb_ENABLE_SYMBOLS_FOR:=$(call gb_Symbols_create_debugfor,$(ENABLE_SYMBOLS_FOR))
+gb_ENABLE_SYMBOLS_FOR=$(call gb_Symbols_create_debugfor,$(ENABLE_SYMBOLS_FOR))
 
 # debug flags, if ENABLE_SYMBOLS is set and the LinkTarget is named
 # in the list of libraries of ENABLE_SYMBOLS_FOR
@@ -922,7 +923,7 @@ endef
 # Add flex scanners to the build.
 # gb_LinkTarget_add_scanners(<component>,<scanner file> [<scanner file>*])
 define gb_LinkTarget_add_scanners
-$(foreach scanner,$(2),$(call gb_LinkTarget_add_scanner,$(1),$(scanner)))
+$(foreach scanner,$(2),$(call gb_LinkTarget_add_scanner,$(1),$(scanner),$(4)))
 
 endef
 
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index e75444f..6e9f8b0 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -196,6 +196,7 @@ endef
 define gb_Module_register_target
 gb_Module_CURRENTTARGET := $(1)
 gb_Module_CURRENTCLEANTARGET := $(2)
+gb_Module_DEBUG_$(gb_Module_CURRENTMODULE) += $(3)
 
 endef
 
@@ -203,6 +204,7 @@ endef
 define gb_Module__read_targetfile
 gb_Module_CURRENTTARGET :=
 gb_Module_CURRENTCLEANTARGET :=
+gb_Module_CURRENTMODULE := $(1)
 include $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS)))$(2).mk
 ifneq ($$(words $$(gb_Module_CURRENTTARGET)) $$(words $$(gb_Module_CURRENTCLEANTARGET)),1 1)
 $$(eval $$(call gb_Output_error,No $(3) registered while reading $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS)))$(2).mk!))
diff --git a/solenv/gbuild/StaticLibrary.mk b/solenv/gbuild/StaticLibrary.mk
index 9179958..db93eea 100644
--- a/solenv/gbuild/StaticLibrary.mk
+++ b/solenv/gbuild/StaticLibrary.mk
@@ -69,7 +69,7 @@ $(call gb_LinkTarget_add_defs,$(2),\
 $(call gb_StaticLibrary_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2))
 $(call gb_StaticLibrary_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2))
 $(call gb_StaticLibrary_StaticLibrary_platform,$(1),$(2))
-$$(eval $$(call gb_Module_register_target,$(call gb_StaticLibrary_get_target,$(1)),$(call gb_StaticLibrary_get_clean_target,$(1))))
+$$(eval $$(call gb_Module_register_target,$(call gb_StaticLibrary_get_target,$(1)),$(call gb_StaticLibrary_get_clean_target,$(1)),StaticLibrary_$(1)))
 $(call gb_Deliver_add_deliverable,$(call gb_StaticLibrary_get_target,$(1)),$(call gb_LinkTarget_get_target,$(2)),$(1))
 
 endef


More information about the Libreoffice-commits mailing list