From: khizmax Date: Thu, 22 Sep 2016 17:08:40 +0000 (+0300) Subject: Fixed gcc-4.8 x86 build (the compiler does not support DCAS) X-Git-Tag: v2.2.0~123 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=libcds.git;a=commitdiff_plain;h=0d2cac6e6d76fc5bfcbc106201da4e0f07de681d Fixed gcc-4.8 x86 build (the compiler does not support DCAS) --- diff --git a/cds/compiler/gcc/defs.h b/cds/compiler/gcc/defs.h index 99d8589c..59c5e86a 100644 --- a/cds/compiler/gcc/defs.h +++ b/cds/compiler/gcc/defs.h @@ -103,14 +103,16 @@ #define cds_unlikely( expr ) __builtin_expect( !!( expr ), 0 ) // double-width CAS support -#if CDS_BUILD_BITS == 64 - // gcc-4.8 does not support 16-word (128bit) atomics -# if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 ) && CDS_COMPILER_VERSION >= 40900 -# define CDS_DCAS_SUPPORT -# endif -#else -# ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 -# define CDS_DCAS_SUPPORT +// note: gcc-4.8 does not support double-word atomics +#if CDS_COMPILER_VERSION >= 40900 +# if CDS_BUILD_BITS == 64 +# ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 +# define CDS_DCAS_SUPPORT +# endif +# else +# ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 +# define CDS_DCAS_SUPPORT +# endif # endif #endif