diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index 49e1873c..f3597e5b 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -83,6 +83,12 @@ else patch -p1 -i ${ROOT}/patch-xopen-source-ios-legacy.patch fi +# See https://github.com/python/cpython/pull/135146 +# TODO(zanieb): Drop in 3.14b3 +if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_14}" ]; then + patch -p1 -i ${ROOT}/patch-static-remote-debug-3.14.patch +fi + # LIBTOOL_CRUFT is unused and breaks cross-compiling on macOS. Nuke it. # Submitted upstream at https://github.com/python/cpython/pull/101048. if [ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_11}" ]; then diff --git a/cpython-unix/patch-jit-cflags-314.patch b/cpython-unix/patch-jit-cflags-314.patch index 3fc200ad..3a16fb5d 100644 --- a/cpython-unix/patch-jit-cflags-314.patch +++ b/cpython-unix/patch-jit-cflags-314.patch @@ -1,5 +1,5 @@ diff --git a/Tools/jit/_targets.py b/Tools/jit/_targets.py -index 6ceb4404e74..94b74b5c8b0 100644 +index d0a1c081ffe..deb83f275d2 100644 --- a/Tools/jit/_targets.py +++ b/Tools/jit/_targets.py @@ -10,6 +10,7 @@ @@ -16,9 +16,9 @@ index 6ceb4404e74..94b74b5c8b0 100644 verbose: bool = False + cflags: str = "" known_symbols: dict[str, int] = dataclasses.field(default_factory=dict) + pyconfig_dir: pathlib.Path = pathlib.Path.cwd().resolve() - def _get_nop(self) -> bytes: -@@ -119,6 +121,7 @@ async def _compile( +@@ -120,6 +122,7 @@ async def _compile( ) -> _stencils.StencilGroup: o = tempdir / f"{opname}.o" args = [ @@ -27,10 +27,10 @@ index 6ceb4404e74..94b74b5c8b0 100644 "-DPy_BUILD_CORE_MODULE", "-D_DEBUG" if self.debug else "-DNDEBUG", diff --git a/Tools/jit/build.py b/Tools/jit/build.py -index 49b08f477db..49a1b11de47 100644 +index 1afd0c76bad..96c4cb07593 100644 --- a/Tools/jit/build.py +++ b/Tools/jit/build.py -@@ -26,11 +26,15 @@ +@@ -39,11 +39,15 @@ parser.add_argument( "-v", "--verbose", action="store_true", help="echo commands as they are run" ) @@ -43,32 +43,32 @@ index 49b08f477db..49a1b11de47 100644 target.force = args.force target.verbose = args.verbose + target.cflags = args.with_cflags + target.pyconfig_dir = args.pyconfig_dir target.build( - out, comment=comment, diff --git a/configure b/configure -index c51192f12c8..0dcef7c2617 100755 +index 884f8a4b068..2e6740c33d9 100755 --- a/configure +++ b/configure @@ -10863,7 +10863,7 @@ then : else case e in #( e) as_fn_append CFLAGS_NODIST " $jit_flags" -- REGEN_JIT_COMMAND="\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host}" -+ REGEN_JIT_COMMAND="\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host} --with-cflags=\"\$(CONFIGURE_CFLAGS)\"" +- REGEN_JIT_COMMAND="\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host} --output-dir . --pyconfig-dir ." ++ REGEN_JIT_COMMAND="\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host} --output-dir . --pyconfig-dir . --with-cflags=\"\$(CONFIGURE_CFLAGS)\"" JIT_STENCILS_H="jit_stencils.h" if test "x$Py_DEBUG" = xtrue then : diff --git a/configure.ac b/configure.ac -index a7b2f62579b..5998f896a4e 100644 +index cf25148bad2..f8bfab7bf96 100644 --- a/configure.ac +++ b/configure.ac @@ -2776,7 +2776,7 @@ AS_VAR_IF([jit_flags], [], [AS_VAR_APPEND([CFLAGS_NODIST], [" $jit_flags"]) AS_VAR_SET([REGEN_JIT_COMMAND], -- ["\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host}"]) -+ ["\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host} --with-cflags=\"\$(CONFIGURE_CFLAGS)\""]) +- ["\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host} --output-dir . --pyconfig-dir ."]) ++ ["\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host} --output-dir . --pyconfig-dir . --with-cflags=\"\$(CONFIGURE_CFLAGS)\""]) AS_VAR_SET([JIT_STENCILS_H], ["jit_stencils.h"]) AS_VAR_IF([Py_DEBUG], [true], diff --git a/cpython-unix/patch-static-remote-debug-3.14.patch b/cpython-unix/patch-static-remote-debug-3.14.patch new file mode 100644 index 00000000..1c359c3d --- /dev/null +++ b/cpython-unix/patch-static-remote-debug-3.14.patch @@ -0,0 +1,22 @@ +diff --git a/Python/remote_debug.h b/Python/remote_debug.h +index 6cbf1c8deaa..ab494ea71da 100644 +--- a/Python/remote_debug.h ++++ b/Python/remote_debug.h +@@ -131,7 +131,7 @@ _Py_RemoteDebug_FreePageCache(proc_handle_t *handle) + } + } + +-void ++static void + _Py_RemoteDebug_ClearCache(proc_handle_t *handle) + { + for (int i = 0; i < MAX_PAGES; i++) { +@@ -989,7 +989,7 @@ _Py_RemoteDebug_ReadRemoteMemory(proc_handle_t *handle, uintptr_t remote_address + #endif + } + +-int ++static int + _Py_RemoteDebug_PagedReadRemoteMemory(proc_handle_t *handle, + uintptr_t addr, + size_t size, diff --git a/pythonbuild/downloads.py b/pythonbuild/downloads.py index 2fb34e89..74dcc959 100644 --- a/pythonbuild/downloads.py +++ b/pythonbuild/downloads.py @@ -82,10 +82,10 @@ "python_tag": "cp313", }, "cpython-3.14": { - "url": "https://www.python.org/ftp/python/3.14.0/Python-3.14.0b1.tar.xz", - "size": 23358200, - "sha256": "2ddd30a77c9f62e065ce648664a254b9b0c011bcdaa8c1c2787087e644cbeb39", - "version": "3.14.0b1", + "url": "https://www.python.org/ftp/python/3.14.0/Python-3.14.0b2.tar.xz", + "size": 23579860, + "sha256": "7ac9e84844bbc0a5a8f1f79a37a68b3b8caf2a58b4aa5999c49227cb36e70ea6", + "version": "3.14.0b2", "licenses": ["Python-2.0", "CNRI-Python"], "license_file": "LICENSE.cpython.txt", "python_tag": "cp314",