Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cpython-unix/build-cpython.sh
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,12 @@ if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_12}" ]; then
else
patch -p1 -i "${ROOT}/patch-configure-bolt-skip-funcs.patch"
fi

# Remove -use-gnu-stack from the BOLT optimization flags as it incorrectly
# removes the PT_GNU_STACK segment. This patch can be removed when this bug
# is fixed in LLVM.
# https://github.com/llvm/llvm-project/issues/174191
patch -p1 -i "${ROOT}/patch-configure-bolt-remove-use-gnu-stack.patch"
fi

# The optimization make targets are both phony and non-phony. This leads
Expand Down
12 changes: 12 additions & 0 deletions cpython-unix/patch-configure-bolt-remove-use-gnu-stack.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/configure.ac b/configure.ac
index a1f4a567095..03264f87d4c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2205,7 +2205,6 @@ then
-inline-ap
-indirect-call-promotion=all
-dyno-stats
- -use-gnu-stack
-frame-opt=hot
")]
)