Skip to content

Commit f0b0905

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 d81b99b commit f0b0905

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
@@ -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)