commit: fa8873388517f552e437be20607c63f625c0bfe7
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat May 10 11:37:40 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May 10 12:53:22 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa887338
dev-lang/python: add USE=tail-call-interp for new tail call interpreter in
3.14.x
This is a new feature in Python 3.14.x that gives performance speedups
but requires new GCC and Clang and may sometimes regress performance.
It's not yet enabled by default upstream.
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-lang/python/metadata.xml | 5 +++++
dev-lang/python/python-3.14.0_beta1-r100.ebuild | 3 ++-
dev-lang/python/python-3.14.0_beta1.ebuild | 3 ++-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dev-lang/python/metadata.xml b/dev-lang/python/metadata.xml
index 22ce986e0676..ba2d5afe2fd5 100644
--- a/dev-lang/python/metadata.xml
+++ b/dev-lang/python/metadata.xml
@@ -26,6 +26,11 @@
by running Python's test suite and collecting statistics
based on its performance. This will take longer to
build.
</flag>
+ <flag name="tail-call-interp">
+ Enable the tail call interpreter. May lead to better
+ performance but is still new and dependent on latest
+ toolchain versions (Clang 19, GCC 15).
+ </flag>
<flag name="valgrind">
Disable pymalloc when running under
<pkg>dev-debug/valgrind</pkg> is detected (may incur
minor
diff --git a/dev-lang/python/python-3.14.0_beta1-r100.ebuild
b/dev-lang/python/python-3.14.0_beta1-r100.ebuild
index 7ba4463de079..886a83b039fd 100644
--- a/dev-lang/python/python-3.14.0_beta1-r100.ebuild
+++ b/dev-lang/python/python-3.14.0_beta1-r100.ebuild
@@ -36,7 +36,7 @@ SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64
~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth build debug +ensurepip examples gdbm jit
- libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind
+ libedit +ncurses pgo +readline +sqlite +ssl tail-call-interp test tk
valgrind
"
REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
@@ -421,6 +421,7 @@ src_configure() {
$(use_enable jit experimental-jit)
$(use_enable pgo optimizations)
$(use_with readline readline "$(usex libedit editline
readline)")
+ $(use_with tail-call-interp)
$(use_with valgrind)
)
diff --git a/dev-lang/python/python-3.14.0_beta1.ebuild
b/dev-lang/python/python-3.14.0_beta1.ebuild
index 3f751e39232b..16596b396754 100644
--- a/dev-lang/python/python-3.14.0_beta1.ebuild
+++ b/dev-lang/python/python-3.14.0_beta1.ebuild
@@ -36,7 +36,7 @@ SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64
~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth build debug +ensurepip examples gdbm jit
- libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind
+ libedit +ncurses pgo +readline +sqlite +ssl tail-call-interp test tk
valgrind
"
REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
@@ -421,6 +421,7 @@ src_configure() {
$(use_enable jit experimental-jit)
$(use_enable pgo optimizations)
$(use_with readline readline "$(usex libedit editline
readline)")
+ $(use_with tail-call-interp)
$(use_with valgrind)
)