From 8467092844478c0ac644865ff3d27134e913f0d2 Mon Sep 17 00:00:00 2001 From: Graham Markall Date: Tue, 24 Sep 2024 22:14:38 +0100 Subject: [PATCH] Force siphash24 hash algorithm when cross-compiling When cross-compiling, the hash function is forced to be FNV because the configure script defines `HAVE_ALIGNED_REQUIRED` which is then used by pyhash.h to change the default to FNV (see #718) This commit fixes the issue by specifying siphash24 to the configure script when cross-compiling. --- recipe/build_base.sh | 3 +++ recipe/meta.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/recipe/build_base.sh b/recipe/build_base.sh index ee75ba60..1cfc4267 100644 --- a/recipe/build_base.sh +++ b/recipe/build_base.sh @@ -277,6 +277,9 @@ if [[ ${PY_FREETHREADING} == yes ]]; then _common_configure_args+=(--disable-gil) fi +# Force siphash24 (https://github.com/conda-forge/python-feedstock/issues/718): +_common_configure_args+=(--with-hash-algorithm=siphash24) + # Add more optimization flags for the static Python interpreter: declare -a PROFILE_TASK=() if [[ ${_OPTIMIZED} == yes ]]; then diff --git a/recipe/meta.yaml b/recipe/meta.yaml index ce2eabd3..46539ff6 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -4,7 +4,7 @@ {% set ver2 = '.'.join(version.split('.')[0:2]) %} {% set ver2nd = ''.join(version.split('.')[0:2]) %} {% set ver3nd = ''.join(version.split('.')[0:3]) %} -{% set build_number = 0 %} +{% set build_number = 1 %} # this makes the linter happy {% set channel_targets = channel_targets or 'conda-forge main' %}