Fix clang 3.4-3.5 64bit build (boost.atomic problem, see https://svn.boost.org/trac...
authorkhizmax <libcds.dev@gmail.com>
Thu, 25 Sep 2014 06:45:17 +0000 (10:45 +0400)
committerkhizmax <libcds.dev@gmail.com>
Thu, 25 Sep 2014 06:45:17 +0000 (10:45 +0400)
cds/compiler/clang/defs.h
tests/cppunit/thread.h

index 41e3e0f360a76b6a3ef5afdc7a09c0cbf684fe41..f2b3a046a9610cf9afab7a06578cd48cfacfaf92 100644 (file)
@@ -14,7 +14,6 @@
 #   error "Compiler version error. Clang version 3.3.0 and above is supported"
 #endif
 
-
 #if defined(_LIBCPP_VERSION) && !defined(CDS_USE_BOOST_ATOMIC)
     // Note: Clang libc++ atomic leads to program crash.
     // So, we use libcds atomic implementation
 
 #include <cds/compiler/gcc/compiler_macro.h>
 
+#if CDS_COMPILER_VERSION >= 30400 && CDS_COMPILER_VERSION < 30500 && CDS_PROCESSOR_ARCH == CDS_PROCESSOR_AMD64
+    // Error compiling 64bit boost.atomic on clang 3.4 - 3.5
+    // see https://svn.boost.org/trac/boost/ticket/9610
+#   define BOOST_HAS_INT128 1
+#endif
+
 #define alignof __alignof__
 
 // C++11 inline namespace
index 0cf4da764e27cc0fc507923373da2b796a2c31a4..68a02be91f7b09f96c028df9215fe042682b83fd 100644 (file)
@@ -3,6 +3,7 @@
 #ifndef __CPPUNIT_THREAD_H
 #define __CPPUNIT_THREAD_H
 
+#include <cds/details/defs.h>
 #include "cppunit/cppunit_mini.h"
 #include <boost/thread.hpp>
 #include <cds/os/timer.h>