[Libreoffice-commits] .: solenv/gbuild

Stephan Bergmann sbergmann at kemper.freedesktop.org
Thu Mar 22 07:02:00 PDT 2012


 solenv/gbuild/platform/WNT_INTEL_GCC.mk |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 1e18fdb2fa0812f91685d9580d48e4d2f8452a26
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Mar 22 15:01:35 2012 +0100

    MinGW: work around newly ambiguous boost::bind calls with GCC 4.6

diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
index 363f1f3..1ba676f 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 \


More information about the Libreoffice-commits mailing list