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.
This commit is contained in:
parent
c987090c73
commit
028f7349a0
|
@ -0,0 +1,2 @@
|
||||||
|
Fix stdatomic.h header check for ICC compiler: the ICC implementation lacks
|
||||||
|
atomic_uintptr_t type which is needed by Python.
|
|
@ -782,7 +782,6 @@ infodir
|
||||||
docdir
|
docdir
|
||||||
oldincludedir
|
oldincludedir
|
||||||
includedir
|
includedir
|
||||||
runstatedir
|
|
||||||
localstatedir
|
localstatedir
|
||||||
sharedstatedir
|
sharedstatedir
|
||||||
sysconfdir
|
sysconfdir
|
||||||
|
@ -896,7 +895,6 @@ datadir='${datarootdir}'
|
||||||
sysconfdir='${prefix}/etc'
|
sysconfdir='${prefix}/etc'
|
||||||
sharedstatedir='${prefix}/com'
|
sharedstatedir='${prefix}/com'
|
||||||
localstatedir='${prefix}/var'
|
localstatedir='${prefix}/var'
|
||||||
runstatedir='${localstatedir}/run'
|
|
||||||
includedir='${prefix}/include'
|
includedir='${prefix}/include'
|
||||||
oldincludedir='/usr/include'
|
oldincludedir='/usr/include'
|
||||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||||
|
@ -1149,15 +1147,6 @@ do
|
||||||
| -silent | --silent | --silen | --sile | --sil)
|
| -silent | --silent | --silen | --sile | --sil)
|
||||||
silent=yes ;;
|
silent=yes ;;
|
||||||
|
|
||||||
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
|
||||||
| --runstate | --runstat | --runsta | --runst | --runs \
|
|
||||||
| --run | --ru | --r)
|
|
||||||
ac_prev=runstatedir ;;
|
|
||||||
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
|
||||||
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
|
||||||
| --run=* | --ru=* | --r=*)
|
|
||||||
runstatedir=$ac_optarg ;;
|
|
||||||
|
|
||||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||||
ac_prev=sbindir ;;
|
ac_prev=sbindir ;;
|
||||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||||
|
@ -1295,7 +1284,7 @@ fi
|
||||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||||
libdir localedir mandir runstatedir
|
libdir localedir mandir
|
||||||
do
|
do
|
||||||
eval ac_val=\$$ac_var
|
eval ac_val=\$$ac_var
|
||||||
# Remove trailing slashes.
|
# Remove trailing slashes.
|
||||||
|
@ -1448,7 +1437,6 @@ Fine tuning of the installation directories:
|
||||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||||
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
|
||||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||||
--includedir=DIR C header files [PREFIX/include]
|
--includedir=DIR C header files [PREFIX/include]
|
||||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||||
|
@ -16775,9 +16763,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
|
||||||
|
|
||||||
#include <stdatomic.h>
|
#include <stdatomic.h>
|
||||||
atomic_int value = ATOMIC_VAR_INIT(1);
|
atomic_int int_var;
|
||||||
|
atomic_uintptr_t uintptr_var;
|
||||||
int main() {
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5414,9 +5414,12 @@ AC_LINK_IFELSE(
|
||||||
[
|
[
|
||||||
AC_LANG_SOURCE([[
|
AC_LANG_SOURCE([[
|
||||||
#include <stdatomic.h>
|
#include <stdatomic.h>
|
||||||
atomic_int value = ATOMIC_VAR_INIT(1);
|
atomic_int int_var;
|
||||||
|
atomic_uintptr_t uintptr_var;
|
||||||
int main() {
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
]])
|
]])
|
||||||
|
@ -5426,7 +5429,7 @@ AC_MSG_RESULT($have_stdatomic_h)
|
||||||
|
|
||||||
if test "$have_stdatomic_h" = yes; then
|
if test "$have_stdatomic_h" = yes; then
|
||||||
AC_DEFINE(HAVE_STD_ATOMIC, 1,
|
AC_DEFINE(HAVE_STD_ATOMIC, 1,
|
||||||
[Has stdatomic.h with atomic_int])
|
[Has stdatomic.h with atomic_int and atomic_uintptr_t])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for GCC >= 4.7 __atomic builtins
|
# Check for GCC >= 4.7 __atomic builtins
|
||||||
|
|
|
@ -1018,7 +1018,7 @@
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
#undef HAVE_STDLIB_H
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
/* Has stdatomic.h with atomic_int */
|
/* Has stdatomic.h with atomic_int and atomic_uintptr_t */
|
||||||
#undef HAVE_STD_ATOMIC
|
#undef HAVE_STD_ATOMIC
|
||||||
|
|
||||||
/* Define to 1 if you have the `strdup' function. */
|
/* Define to 1 if you have the `strdup' function. */
|
||||||
|
|
Loading…
Reference in New Issue