summaryrefslogtreecommitdiff
path: root/dev-lang/python/python-3.8.18.ebuild
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-12-25 15:58:21 +0100
committerMichał Górny <mgorny@gentoo.org>2023-12-26 17:10:20 +0100
commitc5f07606968a6363fbc77a2efd25ab90c05f3ab8 (patch)
tree9353ee95bfb86101103fd3d21e13986e9b7a5fe1 /dev-lang/python/python-3.8.18.ebuild
parent3702caaf9e4a45a6b31d332e4b65f335dbe2703d (diff)
downloadgentoo-c5f07606968a6363fbc77a2efd25ab90c05f3ab8.tar.gz
gentoo-c5f07606968a6363fbc77a2efd25ab90c05f3ab8.tar.bz2
gentoo-c5f07606968a6363fbc77a2efd25ab90c05f3ab8.zip
dev-lang/python: Detect LTO from CFLAGS
Replace the explicit USE=lto flag with automatic detection from CFLAGS via tc-is-lto function. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-lang/python/python-3.8.18.ebuild')
-rw-r--r--dev-lang/python/python-3.8.18.ebuild16
1 files changed, 10 insertions, 6 deletions
diff --git a/dev-lang/python/python-3.8.18.ebuild b/dev-lang/python/python-3.8.18.ebuild
index 1e4a02c073dd..80d2c90ecc14 100644
--- a/dev-lang/python/python-3.8.18.ebuild
+++ b/dev-lang/python/python-3.8.18.ebuild
@@ -30,7 +30,7 @@ LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="
- bluetooth build debug +ensurepip examples gdbm lto +ncurses pgo
+ bluetooth build debug +ensurepip examples gdbm +ncurses pgo
+readline +sqlite +ssl test tk valgrind wininst +xml
"
RESTRICT="!test? ( test )"
@@ -149,11 +149,6 @@ src_configure() {
filter-flags -malign-double
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
# PKG_CONFIG needed for cross.
tc-export CXX PKG_CONFIG
@@ -178,6 +173,7 @@ src_configure() {
--with-libc=
--enable-loadable-sqlite-extensions
--without-ensurepip
+ --without-lto
--with-system-expat
--with-system-ffi
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
@@ -189,6 +185,14 @@ src_configure() {
# disable implicit optimization/debugging flags
local -x OPT=
+ # https://bugs.gentoo.org/700012
+ if tc-is-lto; then
+ append-cflags $(test-flags-CC -ffat-lto-objects)
+ myeconfargs+=(
+ --with-lto
+ )
+ fi
+
if tc-is-cross-compiler ; then
# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)