Skip to contentSkip to conversation

python3: Add a new PACKAGECONFIG knob for free threading

PATCH Superseded Zoltán Böszörményi 2 participants 2 messages Mar 12

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python3: Add a new PACKAGECONFIG knob for free threading

One of the main points in the Python 3.14.x release notes was that free threading is officially supported.

Add PACKAGECONFIG[freethreading] to turn it on with --disable-gil. GIL is the Global Interpreter Lock, which is kept enabled without this option.

By default, keep free threading disabled, i.e. GIL enabled.

---
 meta/recipes-devtools/python/python3_3.14.3.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/python/python3_3.14.3.bb +1 -0
index 7047cd8e8d..1b2ef1e915 100644
@@ -112,6 +112,7 @@ CACHED_CONFIGUREVARS:append:libc-musl = "\
 
 # PGO currently causes builds to not be reproducible so disable by default, see YOCTO #13407
 PACKAGECONFIG ??= "editline gdbm ${@bb.utils.filter('DISTRO_FEATURES', 'lto', d)}"
+PACKAGECONFIG[freethreading] = "--disable-gil,"
 PACKAGECONFIG[readline] = "--with-readline=readline,,readline,,,editline"
 PACKAGECONFIG[editline] = "--with-readline=editline,,libedit,,,readline"
 # Use profile guided optimisation by running PyBench inside qemu-user
Signature · 1 line
2.53.0
#1 lore raw
Quoted 1 line · Zoltan Boszormenyi via lists.openembedded.org

+PACKAGECONFIG[freethreading] = "--disable-gil,"

For build determinism, the enabling option is useful too, even if upstream is not likely to change defaults or introduce some kind of auto-detection.

Alex