summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMalcolm Smith <smith@chaquo.com>2024-08-15 09:43:34 (GMT)
committerGitHub <noreply@github.com>2024-08-15 09:43:34 (GMT)
commit3950392f48e5c8f476f1cc2e9b2de9b2c8567f6b (patch)
treeb8225d06d9dd846e2dac07f0649c6674e6054c80 /configure.ac
parentb106cf8d978b32b04a4394973b850ef2a62cbcc4 (diff)
downloadcpython-3950392f48e5c8f476f1cc2e9b2de9b2c8567f6b.zip
cpython-3950392f48e5c8f476f1cc2e9b2de9b2c8567f6b.tar.gz
cpython-3950392f48e5c8f476f1cc2e9b2de9b2c8567f6b.tar.bz2
gh-99108: Inform HACL when explicit_bzero is unavailable (GH-123027)
Inform HACL whether explicit_bzero is available
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6df55ea..9daace7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7764,6 +7764,16 @@ PY_STDLIB_MOD([_sha2], [test "$with_builtin_sha2" = yes])
PY_STDLIB_MOD([_sha3], [test "$with_builtin_sha3" = yes])
PY_STDLIB_MOD([_blake2], [test "$with_builtin_blake2" = yes])
+LIBHACL_CFLAGS='-I$(srcdir)/Modules/_hacl -I$(srcdir)/Modules/_hacl/include -D_BSD_SOURCE -D_DEFAULT_SOURCE $(PY_STDMODULE_CFLAGS) $(CCSHARED)'
+case "$ac_sys_system" in
+ Linux*)
+ if test "$ac_cv_func_explicit_bzero" = "no"; then
+ LIBHACL_CFLAGS="$LIBHACL_CFLAGS -DLINUX_NO_EXPLICIT_BZERO"
+ fi
+ ;;
+esac
+AC_SUBST([LIBHACL_CFLAGS])
+
dnl This can be extended here to detect e.g. Power8, which HACL* should also support.
AX_CHECK_COMPILE_FLAG([-msse -msse2 -msse3 -msse4.1 -msse4.2],[
[LIBHACL_SIMD128_FLAGS="-msse -msse2 -msse3 -msse4.1 -msse4.2"]