Skip to content

Commit 692a955

Browse files
miss-islingtonzaniebindygreg
authored
[3.13] gh-128472: Add -skip-funcs to BOLT options to fix computed goto errors (gh-128511) (#128573)
gh-128472: Add `-skip-funcs` to BOLT options to fix computed goto errors (gh-128511) * Add `-skip-funcs` to BOLT options to fix computed goto errors * NEWS --------- (cherry picked from commit 24b147a) Co-authored-by: Zanie Blue <[email protected]> Co-authored-by: Gregory Szorc <[email protected]>
1 parent 8f3e555 commit 692a955

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Skip BOLT optimization of functions using computed gotos, fixing errors on
2+
build with LLVM 19.

configure

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2224,7 +2224,14 @@ if test -z "${BOLT_COMMON_FLAGS}"
22242224
then
22252225
AS_VAR_SET(
22262226
[BOLT_COMMON_FLAGS],
2227-
[-update-debug-sections]
2227+
[m4_normalize("
2228+
[-update-debug-sections]
2229+
2230+
dnl At least LLVM 19.x doesn't support computed gotos in PIC compiled code.
2231+
dnl Exclude functions containing computed gotos.
2232+
dnl TODO this may be fixed in LLVM 20.x via https://github.com/llvm/llvm-project/pull/120267.
2233+
[-skip-funcs=_PyEval_EvalFrameDefault,sre_ucs1_match/1,sre_ucs2_match/1,sre_ucs4_match/1]
2234+
")]
22282235
)
22292236
fi
22302237

0 commit comments

Comments
 (0)