diff --git a/.github/workflows/modified_scripts_build.yml b/.github/workflows/modified_scripts_build.yml index cae758a8..29b30c94 100644 --- a/.github/workflows/modified_scripts_build.yml +++ b/.github/workflows/modified_scripts_build.yml @@ -96,6 +96,7 @@ jobs: - macos-15-intel - macos-26 - macos-26-intel + - xcode-27 exclude: ${{fromJson(needs.discover_modified_scripts.outputs.versions_macos_build_exclude)}} runs-on: ${{ matrix.os }} steps: @@ -164,6 +165,7 @@ jobs: - macos-15-intel - macos-26 - macos-26-intel + - xcode-27 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v7 diff --git a/plugins/python-build/share/python-build/patches/3.14.0/Python-3.14.0/0003-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch b/plugins/python-build/share/python-build/patches/3.14.0/Python-3.14.0/0003-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch new file mode 100644 index 00000000..2873fd3f --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.14.0/Python-3.14.0/0003-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch @@ -0,0 +1,105 @@ +From bf2d8d5a2c8fd2e0c5b4368ea7180c57971bc156 Mon Sep 17 00:00:00 2001 +From: Russell Keith-Magee +Date: Tue, 26 May 2026 13:07:16 +0800 +Subject: [PATCH] [3.14] gh-150443: Exclude explicit dup3 and pipe2 checks on + iOS builds. (GH-150444) (#150447) + +Exclude explicit dup3 and pipe2 checks on iOS builds. +(cherry picked from commit 629da5c914b4407e01c1dc06cbcbd8dce825fef3) +--- + configure | 26 +++++++++++++------------- + configure.ac | 6 +++--- + 2 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/configure b/configure +index d31c24dffa2..29190f296af 100755 +--- a/configure ++++ b/configure +@@ -19250,12 +19250,6 @@ if test "x$ac_cv_func_dup" = xyes + then : + printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" +-if test "x$ac_cv_func_dup3" = xyes +-then : +- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv" + if test "x$ac_cv_func_execv" = xyes +@@ -19730,12 +19724,6 @@ if test "x$ac_cv_func_pipe" = xyes + then : + printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +-if test "x$ac_cv_func_pipe2" = xyes +-then : +- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock" + if test "x$ac_cv_func_plock" = xyes +@@ -20381,7 +20369,13 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" + if test "x$ac_cv_func_getentropy" = xyes + then : + printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h +@@ -20392,6 +20386,12 @@ if test "x$ac_cv_func_getgroups" = xyes + then : + printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h + ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h ++ + fi + ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system" + if test "x$ac_cv_func_system" = xyes +diff --git a/configure.ac b/configure.ac +index af7a9623d7b..4c5bf12cc50 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5214,7 +5214,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock closefrom close_range confstr \ +- copy_file_range ctermid dladdr dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dladdr dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid geteuid getgid getgrent getgrgid getgrgid_r \ +@@ -5224,7 +5224,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd grantpt if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_openpt posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_openpt posix_spawn posix_spawnp \ + posix_spawn_file_actions_addclosefrom_np \ + pread preadv preadv2 process_vm_readv \ + pthread_cond_timedwait_relative_np pthread_condattr_setclock pthread_init \ +@@ -5255,7 +5255,7 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- AC_CHECK_FUNCS([getentropy getgroups system]) ++ AC_CHECK_FUNCS([dup3 getentropy getgroups pipe2 system]) + fi + + AC_CHECK_DECL([dirfd], +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.14.0/Python-3.14.0/0004-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch b/plugins/python-build/share/python-build/patches/3.14.0/Python-3.14.0/0004-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch new file mode 100644 index 00000000..36edad49 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.14.0/Python-3.14.0/0004-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch @@ -0,0 +1,101 @@ +From b871bbe60698c7a6bb6409cf4c091088e119eeb3 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 00:27:28 -0700 +Subject: [PATCH] [3.14] gh-153711: Avoid use of dup3 and pipe2 calls + introduced in macOS 27 (#155206) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++ + configure | 32 +++++++++++-------- + configure.ac | 8 ++++- + 3 files changed, 29 insertions(+), 14 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index 29190f296af..2217e59d15f 100755 +--- a/configure ++++ b/configure +@@ -20369,13 +20369,7 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" +-if test "x$ac_cv_func_dup3" = xyes +-then : +- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h +- +-fi +-ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" ++ ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" + if test "x$ac_cv_func_getentropy" = xyes + then : + printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h +@@ -20386,12 +20380,6 @@ if test "x$ac_cv_func_getgroups" = xyes + then : + printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +-if test "x$ac_cv_func_pipe2" = xyes +-then : +- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system" + if test "x$ac_cv_func_system" = xyes +@@ -20400,6 +20388,24 @@ then : + + fi + ++fi ++# In addition, macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +diff --git a/configure.ac b/configure.ac +index 4c5bf12cc50..4ad84af4d17 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5255,7 +5255,13 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- AC_CHECK_FUNCS([dup3 getentropy getgroups pipe2 system]) ++ AC_CHECK_FUNCS([getentropy getgroups system]) ++fi ++# In addition, macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) + fi + + AC_CHECK_DECL([dirfd], +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.14.1/Python-3.14.1/0002-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch b/plugins/python-build/share/python-build/patches/3.14.1/Python-3.14.1/0002-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch new file mode 100644 index 00000000..6d2fbfe6 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.14.1/Python-3.14.1/0002-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch @@ -0,0 +1,105 @@ +From bc2b13dee7629b9c86dc53106311fe26de1a98a5 Mon Sep 17 00:00:00 2001 +From: Russell Keith-Magee +Date: Tue, 26 May 2026 13:07:16 +0800 +Subject: [PATCH] [3.14] gh-150443: Exclude explicit dup3 and pipe2 checks on + iOS builds. (GH-150444) (#150447) + +Exclude explicit dup3 and pipe2 checks on iOS builds. +(cherry picked from commit 629da5c914b4407e01c1dc06cbcbd8dce825fef3) +--- + configure | 26 +++++++++++++------------- + configure.ac | 6 +++--- + 2 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/configure b/configure +index 46eb0665bf4..3f138a8ff11 100755 +--- a/configure ++++ b/configure +@@ -19281,12 +19281,6 @@ if test "x$ac_cv_func_dup" = xyes + then : + printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" +-if test "x$ac_cv_func_dup3" = xyes +-then : +- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv" + if test "x$ac_cv_func_execv" = xyes +@@ -19761,12 +19755,6 @@ if test "x$ac_cv_func_pipe" = xyes + then : + printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +-if test "x$ac_cv_func_pipe2" = xyes +-then : +- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock" + if test "x$ac_cv_func_plock" = xyes +@@ -20412,7 +20400,13 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" + if test "x$ac_cv_func_getentropy" = xyes + then : + printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h +@@ -20423,6 +20417,12 @@ if test "x$ac_cv_func_getgroups" = xyes + then : + printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h + ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h ++ + fi + ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system" + if test "x$ac_cv_func_system" = xyes +diff --git a/configure.ac b/configure.ac +index bd4446e9488..9fdb671d44d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5239,7 +5239,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock closefrom close_range confstr \ +- copy_file_range ctermid dladdr dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dladdr dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid geteuid getgid getgrent getgrgid getgrgid_r \ +@@ -5249,7 +5249,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd grantpt if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_openpt posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_openpt posix_spawn posix_spawnp \ + posix_spawn_file_actions_addclosefrom_np \ + pread preadv preadv2 process_vm_readv \ + pthread_cond_timedwait_relative_np pthread_condattr_setclock pthread_init \ +@@ -5280,7 +5280,7 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- AC_CHECK_FUNCS([getentropy getgroups system]) ++ AC_CHECK_FUNCS([dup3 getentropy getgroups pipe2 system]) + fi + + AC_CHECK_DECL([dirfd], +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.14.1/Python-3.14.1/0003-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch b/plugins/python-build/share/python-build/patches/3.14.1/Python-3.14.1/0003-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch new file mode 100644 index 00000000..4f1a47dd --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.14.1/Python-3.14.1/0003-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch @@ -0,0 +1,101 @@ +From 2d7a52cf26a57b14fde53897d782db55e63fb356 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 00:27:28 -0700 +Subject: [PATCH] [3.14] gh-153711: Avoid use of dup3 and pipe2 calls + introduced in macOS 27 (#155206) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++ + configure | 32 +++++++++++-------- + configure.ac | 8 ++++- + 3 files changed, 29 insertions(+), 14 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index 3f138a8ff11..e38f8d8ab32 100755 +--- a/configure ++++ b/configure +@@ -20400,13 +20400,7 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" +-if test "x$ac_cv_func_dup3" = xyes +-then : +- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h +- +-fi +-ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" ++ ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" + if test "x$ac_cv_func_getentropy" = xyes + then : + printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h +@@ -20417,12 +20411,6 @@ if test "x$ac_cv_func_getgroups" = xyes + then : + printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +-if test "x$ac_cv_func_pipe2" = xyes +-then : +- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system" + if test "x$ac_cv_func_system" = xyes +@@ -20431,6 +20419,24 @@ then : + + fi + ++fi ++# In addition, macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +diff --git a/configure.ac b/configure.ac +index 9fdb671d44d..9e301b6ce6e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5280,7 +5280,13 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- AC_CHECK_FUNCS([dup3 getentropy getgroups pipe2 system]) ++ AC_CHECK_FUNCS([getentropy getgroups system]) ++fi ++# In addition, macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) + fi + + AC_CHECK_DECL([dirfd], +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.14.2/Python-3.14.2/0002-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch b/plugins/python-build/share/python-build/patches/3.14.2/Python-3.14.2/0002-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch new file mode 100644 index 00000000..136e1787 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.14.2/Python-3.14.2/0002-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch @@ -0,0 +1,105 @@ +From 5c927bf09aae2221636300e45187c27b8018766d Mon Sep 17 00:00:00 2001 +From: Russell Keith-Magee +Date: Tue, 26 May 2026 13:07:16 +0800 +Subject: [PATCH] [3.14] gh-150443: Exclude explicit dup3 and pipe2 checks on + iOS builds. (GH-150444) (#150447) + +Exclude explicit dup3 and pipe2 checks on iOS builds. +(cherry picked from commit 629da5c914b4407e01c1dc06cbcbd8dce825fef3) +--- + configure | 26 +++++++++++++------------- + configure.ac | 6 +++--- + 2 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/configure b/configure +index 46eb0665bf4..3f138a8ff11 100755 +--- a/configure ++++ b/configure +@@ -19281,12 +19281,6 @@ if test "x$ac_cv_func_dup" = xyes + then : + printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" +-if test "x$ac_cv_func_dup3" = xyes +-then : +- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv" + if test "x$ac_cv_func_execv" = xyes +@@ -19761,12 +19755,6 @@ if test "x$ac_cv_func_pipe" = xyes + then : + printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +-if test "x$ac_cv_func_pipe2" = xyes +-then : +- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock" + if test "x$ac_cv_func_plock" = xyes +@@ -20412,7 +20400,13 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" + if test "x$ac_cv_func_getentropy" = xyes + then : + printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h +@@ -20423,6 +20417,12 @@ if test "x$ac_cv_func_getgroups" = xyes + then : + printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h + ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h ++ + fi + ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system" + if test "x$ac_cv_func_system" = xyes +diff --git a/configure.ac b/configure.ac +index bd4446e9488..9fdb671d44d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5239,7 +5239,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock closefrom close_range confstr \ +- copy_file_range ctermid dladdr dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dladdr dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid geteuid getgid getgrent getgrgid getgrgid_r \ +@@ -5249,7 +5249,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd grantpt if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_openpt posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_openpt posix_spawn posix_spawnp \ + posix_spawn_file_actions_addclosefrom_np \ + pread preadv preadv2 process_vm_readv \ + pthread_cond_timedwait_relative_np pthread_condattr_setclock pthread_init \ +@@ -5280,7 +5280,7 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- AC_CHECK_FUNCS([getentropy getgroups system]) ++ AC_CHECK_FUNCS([dup3 getentropy getgroups pipe2 system]) + fi + + AC_CHECK_DECL([dirfd], +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.14.2/Python-3.14.2/0003-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch b/plugins/python-build/share/python-build/patches/3.14.2/Python-3.14.2/0003-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch new file mode 100644 index 00000000..4fc9dc9b --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.14.2/Python-3.14.2/0003-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch @@ -0,0 +1,101 @@ +From cb9757118e29df43276f01701e73fe50c57b1b25 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 00:27:28 -0700 +Subject: [PATCH] [3.14] gh-153711: Avoid use of dup3 and pipe2 calls + introduced in macOS 27 (#155206) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++ + configure | 32 +++++++++++-------- + configure.ac | 8 ++++- + 3 files changed, 29 insertions(+), 14 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index 3f138a8ff11..e38f8d8ab32 100755 +--- a/configure ++++ b/configure +@@ -20400,13 +20400,7 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" +-if test "x$ac_cv_func_dup3" = xyes +-then : +- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h +- +-fi +-ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" ++ ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" + if test "x$ac_cv_func_getentropy" = xyes + then : + printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h +@@ -20417,12 +20411,6 @@ if test "x$ac_cv_func_getgroups" = xyes + then : + printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +-if test "x$ac_cv_func_pipe2" = xyes +-then : +- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system" + if test "x$ac_cv_func_system" = xyes +@@ -20431,6 +20419,24 @@ then : + + fi + ++fi ++# In addition, macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +diff --git a/configure.ac b/configure.ac +index 9fdb671d44d..9e301b6ce6e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5280,7 +5280,13 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- AC_CHECK_FUNCS([dup3 getentropy getgroups pipe2 system]) ++ AC_CHECK_FUNCS([getentropy getgroups system]) ++fi ++# In addition, macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) + fi + + AC_CHECK_DECL([dirfd], +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.14.3/Python-3.14.3/0002-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch b/plugins/python-build/share/python-build/patches/3.14.3/Python-3.14.3/0002-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch new file mode 100644 index 00000000..b1511265 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.14.3/Python-3.14.3/0002-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch @@ -0,0 +1,105 @@ +From 14dbab4f78b96ddc611b50558c50b548ae744032 Mon Sep 17 00:00:00 2001 +From: Russell Keith-Magee +Date: Tue, 26 May 2026 13:07:16 +0800 +Subject: [PATCH] [3.14] gh-150443: Exclude explicit dup3 and pipe2 checks on + iOS builds. (GH-150444) (#150447) + +Exclude explicit dup3 and pipe2 checks on iOS builds. +(cherry picked from commit 629da5c914b4407e01c1dc06cbcbd8dce825fef3) +--- + configure | 26 +++++++++++++------------- + configure.ac | 6 +++--- + 2 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/configure b/configure +index 645628fecf2..2dae6dd38dc 100755 +--- a/configure ++++ b/configure +@@ -19281,12 +19281,6 @@ if test "x$ac_cv_func_dup" = xyes + then : + printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" +-if test "x$ac_cv_func_dup3" = xyes +-then : +- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv" + if test "x$ac_cv_func_execv" = xyes +@@ -19761,12 +19755,6 @@ if test "x$ac_cv_func_pipe" = xyes + then : + printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +-if test "x$ac_cv_func_pipe2" = xyes +-then : +- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock" + if test "x$ac_cv_func_plock" = xyes +@@ -20412,7 +20400,13 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" + if test "x$ac_cv_func_getentropy" = xyes + then : + printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h +@@ -20423,6 +20417,12 @@ if test "x$ac_cv_func_getgroups" = xyes + then : + printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h + ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h ++ + fi + ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system" + if test "x$ac_cv_func_system" = xyes +diff --git a/configure.ac b/configure.ac +index d81c76fc122..20411ee381c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5239,7 +5239,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock closefrom close_range confstr \ +- copy_file_range ctermid dladdr dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dladdr dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid geteuid getgid getgrent getgrgid getgrgid_r \ +@@ -5249,7 +5249,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd grantpt if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_openpt posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_openpt posix_spawn posix_spawnp \ + posix_spawn_file_actions_addclosefrom_np \ + pread preadv preadv2 process_vm_readv \ + pthread_cond_timedwait_relative_np pthread_condattr_setclock pthread_init \ +@@ -5280,7 +5280,7 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- AC_CHECK_FUNCS([getentropy getgroups system]) ++ AC_CHECK_FUNCS([dup3 getentropy getgroups pipe2 system]) + fi + + AC_CHECK_DECL([dirfd], +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.14.3/Python-3.14.3/0003-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch b/plugins/python-build/share/python-build/patches/3.14.3/Python-3.14.3/0003-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch new file mode 100644 index 00000000..080ec904 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.14.3/Python-3.14.3/0003-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch @@ -0,0 +1,101 @@ +From 78204cc8e5beb318cee9bf831146bd339602c4c3 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 00:27:28 -0700 +Subject: [PATCH] [3.14] gh-153711: Avoid use of dup3 and pipe2 calls + introduced in macOS 27 (#155206) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++ + configure | 32 +++++++++++-------- + configure.ac | 8 ++++- + 3 files changed, 29 insertions(+), 14 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index 2dae6dd38dc..74c9f7e0a3c 100755 +--- a/configure ++++ b/configure +@@ -20400,13 +20400,7 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" +-if test "x$ac_cv_func_dup3" = xyes +-then : +- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h +- +-fi +-ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" ++ ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" + if test "x$ac_cv_func_getentropy" = xyes + then : + printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h +@@ -20417,12 +20411,6 @@ if test "x$ac_cv_func_getgroups" = xyes + then : + printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +-if test "x$ac_cv_func_pipe2" = xyes +-then : +- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system" + if test "x$ac_cv_func_system" = xyes +@@ -20431,6 +20419,24 @@ then : + + fi + ++fi ++# In addition, macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +diff --git a/configure.ac b/configure.ac +index 20411ee381c..9c4fef6971e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5280,7 +5280,13 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- AC_CHECK_FUNCS([dup3 getentropy getgroups pipe2 system]) ++ AC_CHECK_FUNCS([getentropy getgroups system]) ++fi ++# In addition, macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) + fi + + AC_CHECK_DECL([dirfd], +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.14.4/Python-3.14.4/0002-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch b/plugins/python-build/share/python-build/patches/3.14.4/Python-3.14.4/0002-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch new file mode 100644 index 00000000..bcbfdf90 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.14.4/Python-3.14.4/0002-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch @@ -0,0 +1,105 @@ +From 3ccb6c32cce56e55823dc406e2cdd8f33d588bba Mon Sep 17 00:00:00 2001 +From: Russell Keith-Magee +Date: Tue, 26 May 2026 13:07:16 +0800 +Subject: [PATCH] [3.14] gh-150443: Exclude explicit dup3 and pipe2 checks on + iOS builds. (GH-150444) (#150447) + +Exclude explicit dup3 and pipe2 checks on iOS builds. +(cherry picked from commit 629da5c914b4407e01c1dc06cbcbd8dce825fef3) +--- + configure | 26 +++++++++++++------------- + configure.ac | 6 +++--- + 2 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/configure b/configure +index 8cfdda5a29b..c3e9474bbec 100755 +--- a/configure ++++ b/configure +@@ -19321,12 +19321,6 @@ if test "x$ac_cv_func_dup" = xyes + then : + printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" +-if test "x$ac_cv_func_dup3" = xyes +-then : +- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv" + if test "x$ac_cv_func_execv" = xyes +@@ -19801,12 +19795,6 @@ if test "x$ac_cv_func_pipe" = xyes + then : + printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +-if test "x$ac_cv_func_pipe2" = xyes +-then : +- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock" + if test "x$ac_cv_func_plock" = xyes +@@ -20452,7 +20440,13 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" + if test "x$ac_cv_func_getentropy" = xyes + then : + printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h +@@ -20463,6 +20457,12 @@ if test "x$ac_cv_func_getgroups" = xyes + then : + printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h + ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h ++ + fi + ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system" + if test "x$ac_cv_func_system" = xyes +diff --git a/configure.ac b/configure.ac +index 1acb91fd27b..67128cc4ad0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5242,7 +5242,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock closefrom close_range confstr \ +- copy_file_range ctermid dladdr dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dladdr dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid geteuid getgid getgrent getgrgid getgrgid_r \ +@@ -5252,7 +5252,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd grantpt if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_openpt posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_openpt posix_spawn posix_spawnp \ + posix_spawn_file_actions_addclosefrom_np \ + pread preadv preadv2 process_vm_readv \ + pthread_cond_timedwait_relative_np pthread_condattr_setclock pthread_init \ +@@ -5283,7 +5283,7 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- AC_CHECK_FUNCS([getentropy getgroups system]) ++ AC_CHECK_FUNCS([dup3 getentropy getgroups pipe2 system]) + fi + + AC_CHECK_DECL([dirfd], +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.14.4/Python-3.14.4/0003-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch b/plugins/python-build/share/python-build/patches/3.14.4/Python-3.14.4/0003-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch new file mode 100644 index 00000000..1fda7402 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.14.4/Python-3.14.4/0003-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch @@ -0,0 +1,101 @@ +From 0883623df9ba2ea83d2f9dc3031ac9d975824d98 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 00:27:28 -0700 +Subject: [PATCH] [3.14] gh-153711: Avoid use of dup3 and pipe2 calls + introduced in macOS 27 (#155206) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++ + configure | 32 +++++++++++-------- + configure.ac | 8 ++++- + 3 files changed, 29 insertions(+), 14 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index c3e9474bbec..89233599659 100755 +--- a/configure ++++ b/configure +@@ -20440,13 +20440,7 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" +-if test "x$ac_cv_func_dup3" = xyes +-then : +- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h +- +-fi +-ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" ++ ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" + if test "x$ac_cv_func_getentropy" = xyes + then : + printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h +@@ -20457,12 +20451,6 @@ if test "x$ac_cv_func_getgroups" = xyes + then : + printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +-if test "x$ac_cv_func_pipe2" = xyes +-then : +- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system" + if test "x$ac_cv_func_system" = xyes +@@ -20471,6 +20459,24 @@ then : + + fi + ++fi ++# In addition, macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +diff --git a/configure.ac b/configure.ac +index 67128cc4ad0..c004fce7770 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5283,7 +5283,13 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- AC_CHECK_FUNCS([dup3 getentropy getgroups pipe2 system]) ++ AC_CHECK_FUNCS([getentropy getgroups system]) ++fi ++# In addition, macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) + fi + + AC_CHECK_DECL([dirfd], +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.14.5/Python-3.14.5/0002-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch b/plugins/python-build/share/python-build/patches/3.14.5/Python-3.14.5/0002-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch new file mode 100644 index 00000000..eb4fb73e --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.14.5/Python-3.14.5/0002-3.14-gh-150443-Exclude-explicit-dup3-and-pipe2-check.patch @@ -0,0 +1,105 @@ +From 972bdb3578e667c1fad1b09f3ec6355229c069cd Mon Sep 17 00:00:00 2001 +From: Russell Keith-Magee +Date: Tue, 26 May 2026 13:07:16 +0800 +Subject: [PATCH] [3.14] gh-150443: Exclude explicit dup3 and pipe2 checks on + iOS builds. (GH-150444) (#150447) + +Exclude explicit dup3 and pipe2 checks on iOS builds. +(cherry picked from commit 629da5c914b4407e01c1dc06cbcbd8dce825fef3) +--- + configure | 26 +++++++++++++------------- + configure.ac | 6 +++--- + 2 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/configure b/configure +index 30590a397f8..a5308e561aa 100755 +--- a/configure ++++ b/configure +@@ -19375,12 +19375,6 @@ if test "x$ac_cv_func_dup" = xyes + then : + printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" +-if test "x$ac_cv_func_dup3" = xyes +-then : +- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv" + if test "x$ac_cv_func_execv" = xyes +@@ -19855,12 +19849,6 @@ if test "x$ac_cv_func_pipe" = xyes + then : + printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +-if test "x$ac_cv_func_pipe2" = xyes +-then : +- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock" + if test "x$ac_cv_func_plock" = xyes +@@ -20506,7 +20494,13 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" + if test "x$ac_cv_func_getentropy" = xyes + then : + printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h +@@ -20517,6 +20511,12 @@ if test "x$ac_cv_func_getgroups" = xyes + then : + printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h + ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h ++ + fi + ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system" + if test "x$ac_cv_func_system" = xyes +diff --git a/configure.ac b/configure.ac +index 87c0ead45a6..4ff68cd36a5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5264,7 +5264,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock closefrom close_range confstr \ +- copy_file_range ctermid dladdr dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dladdr dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid geteuid getgid getgrent getgrgid getgrgid_r \ +@@ -5274,7 +5274,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd grantpt if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_openpt posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_openpt posix_spawn posix_spawnp \ + posix_spawn_file_actions_addclosefrom_np \ + pread preadv preadv2 process_vm_readv \ + pthread_cond_timedwait_relative_np pthread_condattr_setclock pthread_init \ +@@ -5305,7 +5305,7 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- AC_CHECK_FUNCS([getentropy getgroups system]) ++ AC_CHECK_FUNCS([dup3 getentropy getgroups pipe2 system]) + fi + + AC_CHECK_DECL([dirfd], +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.14.5/Python-3.14.5/0003-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch b/plugins/python-build/share/python-build/patches/3.14.5/Python-3.14.5/0003-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch new file mode 100644 index 00000000..1b028a54 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.14.5/Python-3.14.5/0003-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch @@ -0,0 +1,101 @@ +From d9fe3c8f79460f2ed5309b9fd667cfdc2a3a0462 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 00:27:28 -0700 +Subject: [PATCH] [3.14] gh-153711: Avoid use of dup3 and pipe2 calls + introduced in macOS 27 (#155206) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++ + configure | 32 +++++++++++-------- + configure.ac | 8 ++++- + 3 files changed, 29 insertions(+), 14 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index a5308e561aa..76ca500c68b 100755 +--- a/configure ++++ b/configure +@@ -20494,13 +20494,7 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" +-if test "x$ac_cv_func_dup3" = xyes +-then : +- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h +- +-fi +-ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" ++ ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" + if test "x$ac_cv_func_getentropy" = xyes + then : + printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h +@@ -20511,12 +20505,6 @@ if test "x$ac_cv_func_getgroups" = xyes + then : + printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +-if test "x$ac_cv_func_pipe2" = xyes +-then : +- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system" + if test "x$ac_cv_func_system" = xyes +@@ -20525,6 +20513,24 @@ then : + + fi + ++fi ++# In addition, macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +diff --git a/configure.ac b/configure.ac +index 4ff68cd36a5..b9f5217704f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5305,7 +5305,13 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- AC_CHECK_FUNCS([dup3 getentropy getgroups pipe2 system]) ++ AC_CHECK_FUNCS([getentropy getgroups system]) ++fi ++# In addition, macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) + fi + + AC_CHECK_DECL([dirfd], +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.14.6/Python-3.14.6/0002-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch b/plugins/python-build/share/python-build/patches/3.14.6/Python-3.14.6/0002-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch new file mode 100644 index 00000000..e5e2b2c8 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.14.6/Python-3.14.6/0002-3.14-gh-153711-Avoid-use-of-dup3-and-pipe2-calls-int.patch @@ -0,0 +1,101 @@ +From 39bab3a49d6f952c55c036aef1872c7d6f701039 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 00:27:28 -0700 +Subject: [PATCH] [3.14] gh-153711: Avoid use of dup3 and pipe2 calls + introduced in macOS 27 (#155206) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++ + configure | 32 +++++++++++-------- + configure.ac | 8 ++++- + 3 files changed, 29 insertions(+), 14 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index 2088290f0ee..6d669963272 100755 +--- a/configure ++++ b/configure +@@ -20494,13 +20494,7 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" +-if test "x$ac_cv_func_dup3" = xyes +-then : +- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h +- +-fi +-ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" ++ ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" + if test "x$ac_cv_func_getentropy" = xyes + then : + printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h +@@ -20511,12 +20505,6 @@ if test "x$ac_cv_func_getgroups" = xyes + then : + printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +-if test "x$ac_cv_func_pipe2" = xyes +-then : +- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system" + if test "x$ac_cv_func_system" = xyes +@@ -20525,6 +20513,24 @@ then : + + fi + ++fi ++# In addition, macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +diff --git a/configure.ac b/configure.ac +index aed14946731..900bf6215e0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5305,7 +5305,13 @@ fi + # header definition prevents usage - autoconf doesn't use the headers), or + # raise an error if used at runtime. Force these symbols off. + if test "$ac_sys_system" != "iOS" ; then +- AC_CHECK_FUNCS([dup3 getentropy getgroups pipe2 system]) ++ AC_CHECK_FUNCS([getentropy getgroups system]) ++fi ++# In addition, macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) + fi + + AC_CHECK_DECL([dirfd], +-- +2.55.0.windows.3 +