Skip to content

Commit ad891c5

Browse files
zaniebindygreg
authored andcommitted
pythongh-128472: Add -skip-funcs to BOLT options to fix computed goto errors (pythongh-128511)
* Add `-skip-funcs` to BOLT options to fix computed goto errors Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com> * NEWS --------- (cherry picked from commit 24b147a) Co-authored-by: Zanie Blue <contact@zanie.dev> Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com>
1 parent fb8bb36 commit ad891c5

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed
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

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

+8-1
Original file line numberDiff line numberDiff line change
@@ -2114,7 +2114,14 @@ if test -z "${BOLT_COMMON_FLAGS}"
21142114
then
21152115
AS_VAR_SET(
21162116
[BOLT_COMMON_FLAGS],
2117-
[-update-debug-sections]
2117+
[m4_normalize("
2118+
[-update-debug-sections]
2119+
2120+
dnl At least LLVM 19.x doesn't support computed gotos in PIC compiled code.
2121+
dnl Exclude functions containing computed gotos.
2122+
dnl TODO this may be fixed in LLVM 20.x via https://github.com/llvm/llvm-project/pull/120267.
2123+
[-skip-funcs=_PyEval_EvalFrameDefault,sre_ucs1_match/1,sre_ucs2_match/1,sre_ucs4_match/1]
2124+
")]
21182125
)
21192126
fi
21202127

0 commit comments

Comments
 (0)