diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-04-20 14:11:40 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-04-23 19:17:42 +0200 |
commit | faa15bd23ef0e54cc677c2252123bddcb90b4f0d (patch) | |
tree | a0dee4980485063f0187efa318882765872ce66e /solenv | |
parent | 922c879b6e8ca126cc23173765b043f849735333 (diff) |
configure checks for gcc options that clang does not support
Maybe they'll be supported somewhen in the future, so do not hardcode
them out. Also, gb_DEBUG_C(XX)FLAGS are apparently common GCC options,
not platform-specific.
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/platform/WNT_INTEL_GCC.mk | 10 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 25 | ||||
-rw-r--r-- | solenv/gbuild/platform/unxgcc.mk | 10 |
3 files changed, 24 insertions, 21 deletions
diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk index 305abf213ace..741d45f5c01a 100644 --- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk +++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk @@ -106,16 +106,6 @@ ifeq ($(MINGW_GCCLIB_EH),YES) gb_LinkTarget_LDFLAGS += -shared-libgcc endif -# clang does not know -ggdb2 -ifneq ($(COM_GCC_IS_CLANG),TRUE) -GGDB2=-ggdb2 -else -GGDB2=-g2 -endif - -gb_DEBUG_CFLAGS := $(GGDB2) -finline-limit=0 -fno-inline -gb_DEBUG_CXXFLAGS := -fno-default-inline - gb_STDLIBS := \ mingwthrd \ mingw32 \ diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index cf4dcab24776..d84ab649e49d 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -93,7 +93,7 @@ gb_LinkTarget_EXCEPTIONFLAGS := \ ifeq ($(gb_PRODUCT),$(true)) # Clang doesn't have this option -ifneq ($(COM_GCC_IS_CLANG),TRUE) +ifeq ($(HAVE_GCC_FNO_ENFORCE_EH_SPECS),TRUE) gb_LinkTarget_EXCEPTIONFLAGS += \ -fno-enforce-eh-specs endif @@ -112,6 +112,29 @@ gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS) endif gb_COMPILERNOOPTFLAGS := -O0 +# Clang does not know -ggdb2 or some other options +ifeq ($(HAVE_GCC_GGDB2),TRUE) +GGDB2=-ggdb2 +else +GGDB2=-g2 +endif + +ifeq ($(HAVE_GCC_FINLINE_LIMIT),TRUE) +FINLINE_LIMIT0=-finline-limit=0 +endif + +ifeq ($(HAVE_GCC_FNO_INLINE),TRUE) +FNO_INLINE=-fno-inline +endif + +ifeq ($(HAVE_GCC_FNO_DEFAULT_INLINE),TRUE) +FNO_DEFAULT_INLINE=-fno-default-inline +endif + +gb_DEBUG_CFLAGS := $(GGDB2) $(FINLINE_LIMIT0) $(FNO_INLINE) +gb_DEBUG_CXXFLAGS := $(FNO_DEFAULT_INLINE) + + gb_LinkTarget_INCLUDE := $(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC))) diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index 8674cded4d27..2681a33d6178 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -181,16 +181,6 @@ gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS) gb_LINKEROPTFLAGS := -Wl,-O1 endif -# clang does not know -ggdb2 -ifneq ($(COM_GCC_IS_CLANG),TRUE) -GGDB2=-ggdb2 -else -GGDB2=-g2 -endif - -gb_DEBUG_CFLAGS := $(GGDB2) -finline-limit=0 -fno-inline -gb_DEBUG_CXXFLAGS := -fno-default-inline - gb_COMPILERNOOPTFLAGS := -O0 # LinkTarget class |