Erik van Pienbroek schreef op zo 21-07-2013 om 14:49 [+0200]:
> So now I think it's up to us to come up with the most proper fix which
> we can then try to get upstreamed.
Attached is the patch I came up with to fix the build issue. It is
basically method 2 in dw's original mail.
The header in question already contained an #include <intrin.h>, but it
was only part of an #ifdef _MSC_VER section (which doesn't get triggered
for mingw-w64). I've changed this #ifdef clause so that it also includes
intrin.h when the mingw-w64 compiler is used.
With this patch I've done the following build tests:
using an old mingw-w64 snapshot (20121016): success!
using a recent mingw-w64 snapshot (20130713, r5949): success!
using a bleeding edge mingw-w64 snapshot (20130721, r5969): success!
The qpid-cpp build failure is also resolved with this patch as well.
Unless somebody objects I think this patch is good enough to be proposed
upstream.
Regards,
Erik
--- boost/detail/interlocked.hpp.interlocked 2012-12-11 15:42:26.000000000 +0100
+++ boost/detail/interlocked.hpp 2013-07-21 15:22:56.082346444 +0200
@@ -69,9 +69,9 @@
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
((void*)BOOST_INTERLOCKED_EXCHANGE((long*)(dest),(long)(exchange)))
-#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
+#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN ) || defined( __MINGW64_VERSION_MAJOR )
-#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600
+#if ( defined( BOOST_MSVC ) && BOOST_MSVC >= 1600 ) || defined( __MINGW64_VERSION_MAJOR )
#include <intrin.h>
@@ -93,12 +93,16 @@
#endif
+# if defined( BOOST_MSVC )
+
# pragma intrinsic( _InterlockedIncrement )
# pragma intrinsic( _InterlockedDecrement )
# pragma intrinsic( _InterlockedCompareExchange )
# pragma intrinsic( _InterlockedExchange )
# pragma intrinsic( _InterlockedExchangeAdd )
+# endif
+
# if defined(_M_IA64) || defined(_M_AMD64)
extern "C" void* __cdecl _InterlockedCompareExchangePointer( void* volatile *, void*, void* );
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public