summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 6 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index ee5573c..39eadfe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5586,14 +5586,15 @@ if test "$have_stdatomic_h" = yes; then
[Has stdatomic.h with atomic_int and atomic_uintptr_t])
fi
-# Check for GCC >= 4.7 __atomic builtins
-AC_MSG_CHECKING(for GCC >= 4.7 __atomic builtins)
+# Check for GCC >= 4.7 and clang __atomic builtin functions
+AC_MSG_CHECKING(for builtin __atomic_load_n and __atomic_store_n functions)
AC_LINK_IFELSE(
[
AC_LANG_SOURCE([[
- volatile int val = 1;
+ int val;
int main() {
- __atomic_load_n(&val, __ATOMIC_SEQ_CST);
+ __atomic_store_n(&val, 1, __ATOMIC_SEQ_CST);
+ (void)__atomic_load_n(&val, __ATOMIC_SEQ_CST);
return 0;
}
]])
@@ -5602,7 +5603,7 @@ AC_LINK_IFELSE(
AC_MSG_RESULT($have_builtin_atomic)
if test "$have_builtin_atomic" = yes; then
- AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Has builtin atomics])
+ AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Has builtin __atomic_load_n() and __atomic_store_n() functions])
fi
# ensurepip option