Skip to content

Commit d8552a4

Browse files
committed
unix: always disable mkfifoat and mknodat on 3.8
Newer Apple SDKs say that these are introduced in macOS 13.0. So we need to ban them unconditionally on 3.8 since 3.8 doesn't support weak linking.
1 parent 7a262ad commit d8552a4

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

cpython-unix/build-cpython.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,10 +553,18 @@ if [ "${PYBUILD_PLATFORM}" = "macos" ]; then
553553
# symbol.
554554
#
555555
# Unfortunately, this means we need to ban weak symbols on CPython 3.8, to
556-
# the detriment of performance. However, we can actually use the symbols
557-
# on aarch64 because it targets macOS SDK 11.0, not 10.9.
558-
if [[ "${PYTHON_MAJMIN_VERSION}" = "3.8" && "${TARGET_TRIPLE}" != "aarch64-apple-darwin" ]]; then
559-
for symbol in clock_getres clock_gettime clock_settime faccessat fchmodat fchownat fdopendir fstatat futimens getentropy linkat mkdirat openat preadv pwritev readlinkat renameat symlinkat unlinkat utimensat; do
556+
# the detriment of performance. However, we can actually use most symbols
557+
# on aarch64 because it targets macOS SDK 11.0, not 10.9. But more modern
558+
# symbols do need to be banned.
559+
if [ "${PYTHON_MAJMIN_VERSION}" = "3.8" ]; then
560+
if [ "${TARGET_TRIPLE}" != "aarch64-apple-darwin" ]; then
561+
for symbol in clock_getres clock_gettime clock_settime faccessat fchmodat fchownat fdopendir fstatat futimens getentropy linkat mkdirat openat preadv pwritev readlinkat renameat symlinkat unlinkat utimensat; do
562+
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} ac_cv_func_${symbol}=no"
563+
done
564+
fi
565+
566+
# mkfifoat, mknodat introduced in SDK 13.0.
567+
for symbol in mkfifoat mknodat; do
560568
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} ac_cv_func_${symbol}=no"
561569
done
562570
fi

0 commit comments

Comments
 (0)