summaryrefslogtreecommitdiffstats
path: root/solenv
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-03-22 15:01:35 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-03-22 15:01:53 +0100
commit1e18fdb2fa0812f91685d9580d48e4d2f8452a26 (patch)
tree663023871357fa5463dbf07505279278c2dad35a /solenv
parentRevert "fix debug build" (diff)
downloadcore-1e18fdb2fa0812f91685d9580d48e4d2f8452a26.tar.gz
core-1e18fdb2fa0812f91685d9580d48e4d2f8452a26.zip
MinGW: work around newly ambiguous boost::bind calls with GCC 4.6
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/platform/WNT_INTEL_GCC.mk13
1 files changed, 12 insertions, 1 deletions
diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
index 363f1f3ead00..1ba676f4cc14 100644
--- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
@@ -34,6 +34,10 @@ gb_TMPDIR:=$(if $(TMPDIR),$(TMPDIR),/tmp)
include $(GBUILDDIR)/platform/com_GCC_defs.mk
include $(GBUILDDIR)/platform/windows.mk
+gb_CCVER := $(shell $(gb_CC) -dumpversion | $(gb_AWK) -F. -- \
+ '{ print $$1*10000+$$2*100+$$3 }')
+gb_GccLess470 := $(shell expr $(gb_CCVER) \< 40700)
+
gb_RC := $(WINDRES)
ifeq ($(GXX_INCLUDE_PATH),)
@@ -45,7 +49,14 @@ gb_COMPILERDEFS += \
-D_NATIVE_WCHAR_T_DEFINED \
-D_MSC_EXTENSIONS \
-D_FORCENAMELESSUNION \
- -DBOOST_MEM_FN_ENABLE_CDECL \
+
+# 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,
+# MinGW uses __thiscall by default, so now needs BOOST_MEM_FN_ENABLE_CDECL for
+# uses of boost::bind with functions annotated with SAL_CALL:
+ifeq ($(gb_GccLess470),0)
+gb_COMPILERDEFS += -DBOOST_MEM_FN_ENABLE_CDECL
+endif
gb_RCDEFS := \
-DWINVER=0x0400 \