@@ -70,12 +70,14 @@ cat Makefile.extra
70
70
pushd Python-${PYTHON_VERSION}
71
71
72
72
# configure doesn't support cross-compiling on Apple. Teach it.
73
- if [ " ${PYTHON_MAJMIN_VERSION} " = " 3.13" ]; then
74
- patch -p1 -i ${ROOT} /patch-apple-cross-3.13.patch
75
- elif [ " ${PYTHON_MAJMIN_VERSION} " = " 3.12" ]; then
76
- patch -p1 -i ${ROOT} /patch-apple-cross-3.12.patch
77
- else
78
- patch -p1 -i ${ROOT} /patch-apple-cross.patch
73
+ if [ " ${PYBUILD_PLATFORM} " = " macos" ]; then
74
+ if [ -n " ${PYTHON_MEETS_MINIMUM_VERSION_3_13} " ]; then
75
+ patch -p1 -i ${ROOT} /patch-apple-cross-3.13.patch
76
+ elif [ " ${PYTHON_MAJMIN_VERSION} " = " 3.12" ]; then
77
+ patch -p1 -i ${ROOT} /patch-apple-cross-3.12.patch
78
+ else
79
+ patch -p1 -i ${ROOT} /patch-apple-cross.patch
80
+ fi
79
81
fi
80
82
81
83
# This patch is slightly different on Python 3.10+.
94
96
# Configure nerfs RUNSHARED when cross-compiling, which prevents PGO from running when
95
97
# we can in fact run the target binaries (e.g. x86_64 host and i686 target). Undo that.
96
98
if [ -n " ${CROSS_COMPILING} " ]; then
97
- if [ -n " ${PYTHON_MEETS_MINIMUM_VERSION_3_13} " ]; then
99
+ if [ -n " ${PYTHON_MEETS_MINIMUM_VERSION_3_14} " ]; then
100
+ patch -p1 -i ${ROOT} /patch-dont-clear-runshared-14.patch
101
+ elif [ -n " ${PYTHON_MEETS_MINIMUM_VERSION_3_13} " ]; then
98
102
patch -p1 -i ${ROOT} /patch-dont-clear-runshared-13.patch
99
103
elif [ -n " ${PYTHON_MEETS_MINIMUM_VERSION_3_11} " ]; then
100
104
patch -p1 -i ${ROOT} /patch-dont-clear-runshared.patch
@@ -471,6 +475,18 @@ if [ "${PYBUILD_PLATFORM}" = "macos" ]; then
471
475
CONFIGURE_FLAGS=" ${CONFIGURE_FLAGS} ac_cv_func_ptsname_r=no"
472
476
fi
473
477
478
+ # explicit_bzero is only available in glibc 2.25+, but we target a lower version for compatibility.
479
+ # it's only needed for the HACL Blake2 implementation in Python 3.14+
480
+ if [ -n " ${PYTHON_MEETS_MINIMUM_VERSION_3_14} " ]; then
481
+ CONFIGURE_FLAGS=" ${CONFIGURE_FLAGS} ac_cv_func_explicit_bzero=no"
482
+ fi
483
+
484
+ # On 3.14+ `test_strftime_y2k` fails when cross-compiling for `x86_64_v2` and `x86_64_v3` targets on
485
+ # Linux, so we ignore it. See https://github.com/python/cpython/issues/128104
486
+ if [[ -n " ${PYTHON_MEETS_MINIMUM_VERSION_3_14} " && -n " ${CROSS_COMPILING} " && " ${PYBUILD_PLATFORM} " != " macos" ]]; then
487
+ export PROFILE_TASK=' -m test --pgo --ignore test_strftime_y2k'
488
+ fi
489
+
474
490
# We use ndbm on macOS and BerkeleyDB elsewhere.
475
491
if [ " ${PYBUILD_PLATFORM} " = " macos" ]; then
476
492
CONFIGURE_FLAGS=" ${CONFIGURE_FLAGS} --with-dbmliborder=ndbm"
0 commit comments