summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-03-02 14:07:25 +0200
committerTor Lillqvist <tml@iki.fi>2012-03-02 15:42:25 +0200
commitfa65ff8b1d2f50fa7f14e92fa7bc3c5d6619831a (patch)
treeef3ed977dd512cb2581a7959778c6126c34bf763 /solenv
parenta871755e673fc83c92bf9731603d22004d0a3f2e (diff)
Check for Clang in configury and store and use result
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/platform/IOS_ARM_GCC.mk2
-rw-r--r--solenv/gbuild/platform/com_GCC_defs.mk2
-rw-r--r--solenv/inc/unxgcc.mk5
-rw-r--r--solenv/inc/unxiosr.mk5
-rw-r--r--solenv/inc/unxmacx.mk5
5 files changed, 14 insertions, 5 deletions
diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk
index 03bae7b54b01..3483213ec1b3 100644
--- a/solenv/gbuild/platform/IOS_ARM_GCC.mk
+++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk
@@ -69,7 +69,7 @@ gb_CXXFLAGS := \
# No idea if -malign-natural is needed, but macosx.mk uses it...
# Why it isn't used in gb_CFLAGS I have no idea.
# Anyway, Clang doesn't have this option.
-ifeq (,$(findstring /clang,$(CXX)))
+ifneq ($(COM_GCC_IS_CLANG),TRUE)
gb_CXXFLAGS += \
-malign-natural
endif
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index b6aff7fdefc6..cf770630ca78 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -121,7 +121,7 @@ gb_LinkTarget_EXCEPTIONFLAGS := \
-fexceptions
# Clang doesn't have this option
-ifeq (,$(findstring /clang,$(CXX)))
+ifneq ($(COM_GCC_IS_CLANG),TRUE)
gb_LinkTarget_EXCEPTIONFLAGS += \
-fno-enforce-eh-specs
endif
diff --git a/solenv/inc/unxgcc.mk b/solenv/inc/unxgcc.mk
index 14983dd5b019..3765b2dd6cea 100644
--- a/solenv/inc/unxgcc.mk
+++ b/solenv/inc/unxgcc.mk
@@ -78,7 +78,10 @@ CFLAGSENABLESYMBOLS=-g
# flags for the C++ Compiler
CFLAGSCC= -pipe $(ARCH_FLAGS)
# Flags for enabling exception handling
-CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
+CFLAGSEXCEPTIONS=-fexceptions
+.IF "$(COM_GCC_IS_CLANG)" != "TRUE"
+CFLAGSEXCEPTIONS+=-fno-enforce-eh-specs
+.ENDIF
# Flags for disabling exception handling
CFLAGS_NO_EXCEPTIONS=-fno-exceptions
diff --git a/solenv/inc/unxiosr.mk b/solenv/inc/unxiosr.mk
index 6ddb15af841e..6928b94842ac 100644
--- a/solenv/inc/unxiosr.mk
+++ b/solenv/inc/unxiosr.mk
@@ -57,7 +57,10 @@ OBJCFLAGS=-fexceptions -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS
OBJCXXFLAGS:=-x objective-c++ $(OBJCFLAGS)
# Comp Flags for files that need exceptions enabled (C and C++)
-CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
+CFLAGSEXCEPTIONS=-fexceptions
+.IF "$(COM_GCC_IS_CLANG)" != "TRUE"
+CFLAGSEXCEPTIONS+=-fno-enforce-eh-specs
+.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 b0c862ec17c1..0cb0b62ee02f 100644
--- a/solenv/inc/unxmacx.mk
+++ b/solenv/inc/unxmacx.mk
@@ -103,7 +103,10 @@ OBJCFLAGS=-fobjc-exceptions
OBJCXXFLAGS=-x objective-c++ -fobjc-exceptions
# Comp Flags for files that need exceptions enabled (C and C++)
-CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
+CFLAGSEXCEPTIONS=-fexceptions
+.IF "$(COM_GCC_IS_CLANG)" != "TRUE"
+CFLAGSEXCEPTIONS+=-fno-enforce-eh-specs
+.ENDIF
# Comp Flags for files that do not need exceptions enabled (C and C++)
CFLAGS_NO_EXCEPTIONS=-fno-exceptions