diff options
author | Victor Stinner <vstinner@python.org> | 2019-10-22 19:53:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-22 19:53:50 (GMT) |
commit | 028f7349a0f6eaea0fec31becb587fcdf6e3cb28 (patch) | |
tree | 50ed359f27bb7e79c69cd8bff947b2e83e90e4bc /configure.ac | |
parent | c987090c731a363c58a02d0efcb3c2d49ccf61ed (diff) | |
download | cpython-028f7349a0f6eaea0fec31becb587fcdf6e3cb28.zip cpython-028f7349a0f6eaea0fec31becb587fcdf6e3cb28.tar.gz cpython-028f7349a0f6eaea0fec31becb587fcdf6e3cb28.tar.bz2 |
bpo-37415: Fix stdatomic.h header check for ICC compiler (GH-16717)
Fix stdatomic.h header check for ICC compiler: the ICC implementation
lacks atomic_uintptr_t type which is needed by Python.
Test:
* atomic_int and atomic_uintptr_t types
* atomic_load_explicit() and atomic_store_explicit()
* memory_order_relaxed and memory_order_seq_cst constants
But don't test ATOMIC_VAR_INIT(): it's not used in Python.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 8de5340..20d8a52 100644 --- a/configure.ac +++ b/configure.ac @@ -5414,9 +5414,12 @@ AC_LINK_IFELSE( [ AC_LANG_SOURCE([[ #include <stdatomic.h> - atomic_int value = ATOMIC_VAR_INIT(1); + atomic_int int_var; + atomic_uintptr_t uintptr_var; int main() { - int loaded_value = atomic_load(&value); + atomic_store_explicit(&int_var, 5, memory_order_relaxed); + atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed); + int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst); return 0; } ]]) @@ -5426,7 +5429,7 @@ AC_MSG_RESULT($have_stdatomic_h) if test "$have_stdatomic_h" = yes; then AC_DEFINE(HAVE_STD_ATOMIC, 1, - [Has stdatomic.h with atomic_int]) + [Has stdatomic.h with atomic_int and atomic_uintptr_t]) fi # Check for GCC >= 4.7 __atomic builtins |