From 7a6a7cc4820107dd768a47eaf20c0ec8fa918d2d Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 28 Dec 2016 23:43:05 +0300 Subject: Fix AO_stack build failure on OS X 10.7 because of missing CAS (x86_64) Issue #23 (libatomic_ops). * src/atomic_ops/sysdeps/gcc/x86.h [AO_GCC_ATOMIC_TEST_AND_SET && __APPLE_CC__ && __x86_64__] (AO_GCC_FORCE_HAVE_CAS): Define (to workaround missing __GCC_HAVE_SYNC_COMPARE_AND_SWAP_ predefined macro in Apple clang-425/x86_64); add comment. --- src/atomic_ops/sysdeps/gcc/x86.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/atomic_ops/sysdeps/gcc/x86.h b/src/atomic_ops/sysdeps/gcc/x86.h index ded34ac..4f81773 100644 --- a/src/atomic_ops/sysdeps/gcc/x86.h +++ b/src/atomic_ops/sysdeps/gcc/x86.h @@ -43,6 +43,9 @@ /* As of Apple clang-600 (based on LLVM 3.5svn), it has some bug in */ /* double-wide CAS implementation for x64 target. */ # define AO_SKIPATOMIC_double_compare_and_swap_ANY + /* OS X 10.7 clang-425/x64 lacks __GCC_HAVE_SYNC_COMPARE_AND_SWAP_n */ + /* predefined macro (unlike e.g. OS X 10.11 clang-703). */ +# define AO_GCC_FORCE_HAVE_CAS # endif #else /* AO_DISABLE_GCC_ATOMICS */ -- cgit v1.2.1