From 2d8972d70c4ac7ce125d01387961924fcb395985 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Tue, 14 Jan 2025 11:40:45 -0600 Subject: [PATCH] Update CPython 3.14a3 -> 3.14a4 (#493) --- cpython-unix/build-cpython.sh | 14 ++++++++---- ...atch-configure-bolt-apply-flags-3.14.patch | 22 +++++++++++++++++++ pythonbuild/downloads.py | 8 +++---- 3 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 cpython-unix/patch-configure-bolt-apply-flags-3.14.patch diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index edf68527..e7ed8cb1 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -284,11 +284,17 @@ if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_11}" ]; then fi if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_12}" ]; then - # Adjust BOLT flags to yield better behavior. See inline details in patch. - patch -p1 -i ${ROOT}/patch-configure-bolt-flags.patch + # On 3.14+, we upstreamed these changes and they are no longer needed + if [ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_13}" ]; then + # Adjust BOLT flags to yield better behavior. See inline details in patch. + patch -p1 -i ${ROOT}/patch-configure-bolt-flags.patch - # Adjust BOLT application flags to make use of modern LLVM features. - patch -p1 -i ${ROOT}/patch-configure-bolt-apply-flags.patch + # Adjust BOLT application flags to make use of modern LLVM features. + patch -p1 -i ${ROOT}/patch-configure-bolt-apply-flags.patch + else + # We are still upstreaming some additional optimization flags + patch -p1 -i ${ROOT}/patch-configure-bolt-apply-flags-3.14.patch + fi fi # The optimization make targets are both phony and non-phony. This leads diff --git a/cpython-unix/patch-configure-bolt-apply-flags-3.14.patch b/cpython-unix/patch-configure-bolt-apply-flags-3.14.patch new file mode 100644 index 00000000..e810a482 --- /dev/null +++ b/cpython-unix/patch-configure-bolt-apply-flags-3.14.patch @@ -0,0 +1,22 @@ +diff --git a/configure.ac b/configure.ac +index ee034e5a962..f1a69b7d4a7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2183,8 +2183,9 @@ then + [m4_normalize(" + -update-debug-sections + -reorder-blocks=ext-tsp + -reorder-functions=cdsort + -split-functions ++ -split-strategy=cdsplit + -icf=1 + -inline-all + -split-eh +@@ -2196,6 +2197,7 @@ then + -dyno-stats + -use-gnu-stack + -frame-opt=hot ++ -hugify + ")] + ) + fi diff --git a/pythonbuild/downloads.py b/pythonbuild/downloads.py index e3e1a1ba..983efa04 100644 --- a/pythonbuild/downloads.py +++ b/pythonbuild/downloads.py @@ -80,10 +80,10 @@ "python_tag": "cp313", }, "cpython-3.14": { - "url": "https://www.python.org/ftp/python/3.14.0/Python-3.14.0a3.tar.xz", - "size": 22749680, - "sha256": "94349df207456a575a8867c20b4ca434f870e1920dcdcc8fdf797e1af49abe90", - "version": "3.14.0a3", + "url": "https://www.python.org/ftp/python/3.14.0/Python-3.14.0a4.tar.xz", + "size": 22798932, + "sha256": "c24f07881873c1d460228795ca6ca8c99130e30c773c91463d30d7ea8ff0e70b", + "version": "3.14.0a4", "licenses": ["Python-2.0", "CNRI-Python"], "license_file": "LICENSE.cpython.txt", "python_tag": "cp314",