File tree Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -317,6 +317,12 @@ if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_12}" ]; then
317317 patch -p1 -i ${ROOT} /patch-test-embed-prevent-segfault.patch
318318fi
319319
320+
321+ # For Python 3.14+, the include for `cpuid.h` is improperly guarded
322+ if [[ -n " ${PYTHON_MEETS_MINIMUM_VERSION_3_14} " && " ${CC} " = " musl-clang" ]]; then
323+ patch -p1 -i ${ROOT} /patch-blake-musl-314.patch
324+ fi
325+
320326# Most bits look at CFLAGS. But setup.py only looks at CPPFLAGS.
321327# So we need to set both.
322328CFLAGS=" ${EXTRA_TARGET_CFLAGS} -fPIC -I${TOOLS_PATH} /deps/include -I${TOOLS_PATH} /deps/include/ncursesw"
Original file line number Diff line number Diff line change @@ -49,11 +49,6 @@ _blake2:
4949 # Disable `explicit_bzero`, it requires glib 2.25+
5050 - define : LINUX_NO_EXPLICIT_BZERO
5151 minimum-python-version : " 3.14"
52- # Disable cpuid.h requirement for musl builds
53- - define : NO_CPUID
54- targets :
55- - .*-unknown-linux-musl
56- minimum-python-version : " 3.14"
5752
5853_bz2 :
5954 sources :
Original file line number Diff line number Diff line change 1+ diff --git a/Modules/blake2module.c b/Modules/blake2module.c
2+ --- a/Modules/blake2module.c
3+ +++ b/Modules/blake2module.c
4+ @@ -33,7 +33,7 @@
5+ // pulled into the build automatically, and then only the CPU autodetection will
6+ // need to be updated here.
7+
8+ - #if defined(__x86_64__) && defined(__GNUC__)
9+ + #if defined(__x86_64__) && defined(__GLIBC__)
10+ #include <cpuid.h>
11+ #elif defined(_M_X64)
12+ #include <intrin.h>
You can’t perform that action at this time.
0 commit comments