Skip to content
Snippets Groups Projects
Commit 4528b0e3 authored by Andrea Michelotti's avatar Andrea Michelotti
Browse files

arm has atomic builtin unsupported

parent bb2a6050
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@ BSON_BEGIN_DECLS
#define __BSON_NEED_ATOMIC_32
#endif
#ifdef BSON_HAVE_ATOMIC_64_ADD_AND_FETCH
#if BSON_GNUC_IS_VERSION(4, 1)
#if BSON_GNUC_IS_VERSION(4, 1) || defined(CHAOS_TARGET)
/*
* GCC 4.1 on i386 can generate buggy 64-bit atomic increment.
* So we will work around with a fallback.
......
......@@ -46,7 +46,7 @@
* dependent. For example, some PPC or ARM systems may not have it even
* if it is a recent GCC version.
*/
#if !defined DISABLE_COMPARE_AND_SWAP
#if !defined DISABLE_COMPARE_AND_SWAP && ! defined(CHAOS_TARGET)
#define BSON_HAVE_ATOMIC_32_ADD_AND_FETCH 1
#else
#define BSON_HAVE_ATOMIC_32_ADD_AND_FETCH 0
......@@ -59,13 +59,13 @@
/*
* Similarly, define to 1 if we have access to GCC 64-bit atomic builtins.
*/
#if !defined DISABLE_COMPARE_AND_SWAP
#if !defined DISABLE_COMPARE_AND_SWAP && ! defined(CHAOS_TARGET)
#define BSON_HAVE_ATOMIC_64_ADD_AND_FETCH 1
#else
#define BSON_HAVE_ATOMIC_64_ADD_AND_FETCH 0
#endif
#if BSON_HAVE_ATOMIC_64_ADD_AND_FETCH != 1
#if BSON_HAVE_ATOMIC_64_ADD_AND_FETCH != 1 && ! defined(CHAOS_TARGET)
# undef BSON_HAVE_ATOMIC_64_ADD_AND_FETCH
#endif
......
......@@ -146,6 +146,8 @@ ENDIF()
IF(CHAOS_TARGET)
SET(CHAOS_POSTFIX ${CHAOS_TARGET})
ADD_DEFINITIONS(-DCHAOS_TARGET)
ELSE()
SET(CHAOS_POSTFIX "${CHAOS_SYSTEM_MACHINE}-${CHAOS_SYSTEM_NAME}")
ENDIF()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment