File tree 3 files changed +18
-5
lines changed 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
317
317
patch -p1 -i ${ROOT} /patch-test-embed-prevent-segfault.patch
318
318
fi
319
319
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
+
320
326
# Most bits look at CFLAGS. But setup.py only looks at CPPFLAGS.
321
327
# So we need to set both.
322
328
CFLAGS=" ${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:
49
49
# Disable `explicit_bzero`, it requires glib 2.25+
50
50
- define : LINUX_NO_EXPLICIT_BZERO
51
51
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"
57
52
58
53
_bz2 :
59
54
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