Skip to content

Commit

Permalink
Force siphash24 hash algorithm when cross-compiling
Browse files Browse the repository at this point in the history
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 conda-forge#718)

This commit fixes the issue by specifying siphash24 to the configure
script when cross-compiling.
  • Loading branch information
gmarkall authored and matthiasdiener committed Oct 15, 2024
1 parent 12d71f4 commit 8467092
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions recipe/build_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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' %}
Expand Down

0 comments on commit 8467092

Please sign in to comment.