[Libreoffice-commits] .: solenv/gbuild solenv/inc

Lubos Lunak llunak at kemper.freedesktop.org
Fri Apr 6 12:33:34 PDT 2012


 solenv/gbuild/platform/WNT_INTEL_GCC.mk |    2 ++
 solenv/gbuild/platform/com_GCC_defs.mk  |    2 ++
 solenv/inc/unxgcc.mk                    |    2 ++
 solenv/inc/unxiosr.mk                   |    2 ++
 solenv/inc/unxmacx.mk                   |    2 ++
 solenv/inc/wntgcci.mk                   |    5 ++++-
 6 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit cdd0e1810d4019d827563b436c1b3b8d1cf5b579
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Fri Apr 6 21:29:43 2012 +0200

    enable -fno-enforce-eh-specs only for non-dbgutil builds
    
    The code uses exception specifications, so it doesn't make much
    sense to have them, but disable them using a gcc option. MSVC
    ignores them completely, so this would leave only clang as
    the only compiler to enforce them. Either the majority compiler
    needs to enforce it at least in dbgutil builds (in product builds
    the option can be seen as a kind of NDEBUG), or alternatively
    the exception specifications should be removed.

diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
index 1ba676f..08b5351 100644
--- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
@@ -93,8 +93,10 @@ ifeq ($(HAVE_CXX0X),TRUE)
 # FIXME still does not compile fully gb_CXXFLAGS += -std=gnu++0x
 endif
 
+ifeq ($(gb_PRODUCT),$(true))
 gb_LinkTarget_EXCEPTIONFLAGS += \
 	-fno-enforce-eh-specs \
+endif
 
 # At least sal defines its own __main, which would cause DLLs linking against
 # sal to pick up sal's __main instead of the one from MinGW's dllcrt2.o:
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 4018ebc..c025e70 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -120,11 +120,13 @@ gb_LinkTarget_EXCEPTIONFLAGS := \
 	-DEXCEPTIONS_ON \
 	-fexceptions
 
+ifeq ($(gb_PRODUCT),$(true))
 # Clang doesn't have this option
 ifneq ($(COM_GCC_IS_CLANG),TRUE)
 gb_LinkTarget_EXCEPTIONFLAGS += \
 	-fno-enforce-eh-specs
 endif
+endif
 
 gb_LinkTarget_NOEXCEPTIONFLAGS := \
 	-DEXCEPTIONS_OFF \
diff --git a/solenv/inc/unxgcc.mk b/solenv/inc/unxgcc.mk
index 4f9ebee..151fc8b 100644
--- a/solenv/inc/unxgcc.mk
+++ b/solenv/inc/unxgcc.mk
@@ -83,9 +83,11 @@ CFLAGSENABLESYMBOLS=-g
 CFLAGSCC= -pipe $(ARCH_FLAGS)
 # Flags for enabling exception handling
 CFLAGSEXCEPTIONS=-fexceptions
+.IF "$(dbgutil)"==""
 .IF "$(COM_GCC_IS_CLANG)" != "TRUE"
 CFLAGSEXCEPTIONS+=-fno-enforce-eh-specs
 .ENDIF
+.ENDIF
 # Flags for disabling exception handling
 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
 
diff --git a/solenv/inc/unxiosr.mk b/solenv/inc/unxiosr.mk
index 05bded5..089dc3d 100644
--- a/solenv/inc/unxiosr.mk
+++ b/solenv/inc/unxiosr.mk
@@ -53,9 +53,11 @@ OBJCXXFLAGS:=-x objective-c++ $(OBJCFLAGS)
 
 # Comp Flags for files that need exceptions enabled (C and C++)
 CFLAGSEXCEPTIONS=-fexceptions
+.IF "$(dbgutil)"==""
 .IF "$(COM_GCC_IS_CLANG)" != "TRUE"
 CFLAGSEXCEPTIONS+=-fno-enforce-eh-specs
 .ENDIF
+.ENDIF
 
 # Comp Flags for files that do not need exceptions enabled (C and C++)
 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
diff --git a/solenv/inc/unxmacx.mk b/solenv/inc/unxmacx.mk
index 8f36772..c829a45 100644
--- a/solenv/inc/unxmacx.mk
+++ b/solenv/inc/unxmacx.mk
@@ -107,9 +107,11 @@ OBJCXXFLAGS=-x objective-c++ -fobjc-exceptions
 
 # Comp Flags for files that need exceptions enabled (C and C++)
 CFLAGSEXCEPTIONS=-fexceptions
+.IF "$(dbgutil)"==""
 .IF "$(COM_GCC_IS_CLANG)" != "TRUE"
 CFLAGSEXCEPTIONS+=-fno-enforce-eh-specs
 .ENDIF
+.ENDIF
 
 # Comp Flags for files that do not need exceptions enabled (C and C++)
 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
diff --git a/solenv/inc/wntgcci.mk b/solenv/inc/wntgcci.mk
index bdf46b4..c8e39d1 100644
--- a/solenv/inc/wntgcci.mk
+++ b/solenv/inc/wntgcci.mk
@@ -51,8 +51,11 @@ CFLAGSCXX=-pipe $(ARCH_FLAGS)
 # FIXME still does not compile fully CFLAGSCXX+=-std=gnu++0x
 .ENDIF
 
-CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
+CFLAGSEXCEPTIONS=-fexceptions
 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
+.IF "$(dbgutil)"==""
+CFLAGSEXCEPTIONS+= -fno-enforce-eh-specs
+.ENDIF
 PICSWITCH:=
 
 CFLAGSOBJGUIST=


More information about the Libreoffice-commits mailing list