summaryrefslogtreecommitdiff
path: root/solenv/gbuild/platform/WNT_INTEL_GCC.mk
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-08-09 18:09:38 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-08-09 18:28:32 +0200
commit63a1212a42bb0c5fa8f1d3d847a5e0fb6126d1c4 (patch)
treeab66d043ee65aca03197a4589350670071e82016 /solenv/gbuild/platform/WNT_INTEL_GCC.mk
parentc3140e23ff7a22e3b4126a2d12ee90dfdcd19ce2 (diff)
try to ensure not testing GCC version when using Clang
Clang reports itself as GCC 4.2.1 when asked the GCC way, which is about as good an answer as any, since there's no good mapping between them. So when testing GCC version, Clang would be usually considered too old, and therefore the proper way is to do a configure check if possible. GCC version should be only used for GCC-specific things such as avoiding a bug in a specific GCC version, and such testing should first check the compiler is not Clang. Rename GCCVER to GCC_VERSION and use it throughout the build system where needed. As it's empty for anything that's not GCC, this should lead to errors when used incorrectly. Change-Id: Iea96bbaf5d8ceabefa25be88576eeb4115384937
Diffstat (limited to 'solenv/gbuild/platform/WNT_INTEL_GCC.mk')
-rw-r--r--solenv/gbuild/platform/WNT_INTEL_GCC.mk6
1 files changed, 3 insertions, 3 deletions
diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
index 49b0103b1562..728e0426322f 100644
--- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
@@ -25,12 +25,11 @@ gb_TMPDIR:=$(if $(TMPDIR),$(TMPDIR),/tmp)
include $(GBUILDDIR)/platform/com_GCC_defs.mk
include $(GBUILDDIR)/platform/windows.mk
+ifeq ($(COM_GCC_IS_CLANG),)
# This has to do something with calling conventions, which are different
# for x86 and x64. Don't put it in the common part since it is breaking
# and conde that uses boost::bind
-gb_CCVER := $(shell $(gb_CC) -dumpversion | $(gb_AWK) -F. -- \
- '{ print $$1*10000+$$2*100+$$3 }')
-gb_GccLess470 := $(shell expr $(gb_CCVER) \< 40700)
+gb_GccLess470 := $(shell expr $(GCC_VERSION) \< 407)
# Until GCC 4.6, MinGW used __cdecl by default, and BOOST_MEM_FN_ENABLE_CDECL
# would result in ambiguous calls to overloaded boost::bind; since GCC 4.7,
@@ -39,6 +38,7 @@ gb_GccLess470 := $(shell expr $(gb_CCVER) \< 40700)
ifeq ($(gb_GccLess470),0)
gb_COMPILERDEFS += -DBOOST_MEM_FN_ENABLE_CDECL
endif
+endif
include $(GBUILDDIR)/platform/mingw.mk