From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 53837158015 for ; Tue, 26 Dec 2023 16:10:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 918A02BC013; Tue, 26 Dec 2023 16:10:25 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6FAFB2BC013 for ; Tue, 26 Dec 2023 16:10:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9F136335DCC for ; Tue, 26 Dec 2023 16:10:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0D0BCED2 for ; Tue, 26 Dec 2023 16:10:23 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1703607020.c5f07606968a6363fbc77a2efd25ab90c05f3ab8.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/python/python-3.10.13.ebuild dev-lang/python/python-3.11.7.ebuild dev-lang/python/python-3.12.1_p1.ebuild dev-lang/python/python-3.13.0_alpha2.ebuild dev-lang/python/python-3.8.18.ebuild dev-lang/python/python-3.9.18.ebuild X-VCS-Directories: dev-lang/python/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: c5f07606968a6363fbc77a2efd25ab90c05f3ab8 X-VCS-Branch: master Date: Tue, 26 Dec 2023 16:10:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 95a7f389-1f78-4ea8-b60e-85f7da628390 X-Archives-Hash: 6e905c48b5ebee40970b784e167204f7 commit: c5f07606968a6363fbc77a2efd25ab90c05f3ab8 Author: Michał Górny gentoo org> AuthorDate: Mon Dec 25 14:58:21 2023 +0000 Commit: Michał Górny gentoo org> CommitDate: Tue Dec 26 16:10:20 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5f07606 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 gentoo.org> dev-lang/python/python-3.10.13.ebuild | 17 ++++++++++------- dev-lang/python/python-3.11.7.ebuild | 18 ++++++++++-------- dev-lang/python/python-3.12.1_p1.ebuild | 19 +++++++++++-------- dev-lang/python/python-3.13.0_alpha2.ebuild | 19 +++++++++++-------- dev-lang/python/python-3.8.18.ebuild | 16 ++++++++++------ dev-lang/python/python-3.9.18.ebuild | 17 ++++++++++------- 6 files changed, 62 insertions(+), 44 deletions(-) diff --git a/dev-lang/python/python-3.10.13.ebuild b/dev-lang/python/python-3.10.13.ebuild index a147169c4d1f..be5cdcb2af4f 100644 --- a/dev-lang/python/python-3.10.13.ebuild +++ b/dev-lang/python/python-3.10.13.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 libedit lto + bluetooth build debug +ensurepip examples gdbm libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind +xml " RESTRICT="!test? ( test )" @@ -223,11 +223,6 @@ src_configure() { append-flags -fwrapv 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 @@ -291,12 +286,12 @@ 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 $(use_with debug assertions) - $(use_with lto) $(use_enable pgo optimizations) $(use_with readline readline "$(usex libedit editline readline)") $(use_with valgrind) @@ -305,6 +300,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 build_cbuild_python # Point the imminent CHOST build to the Python we just diff --git a/dev-lang/python/python-3.11.7.ebuild b/dev-lang/python/python-3.11.7.ebuild index 7b984e8e2242..5bfd3472f572 100644 --- a/dev-lang/python/python-3.11.7.ebuild +++ b/dev-lang/python/python-3.11.7.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 libedit lto + bluetooth build debug +ensurepip examples gdbm libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind " RESTRICT="!test? ( test )" @@ -202,7 +202,6 @@ build_cbuild_python() { } src_configure() { - local disable # disable automagic bluetooth headers detection if ! use bluetooth; then local -x ac_cv_header_bluetooth_bluetooth_h=no @@ -211,11 +210,6 @@ src_configure() { append-flags -fwrapv 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 @@ -279,6 +273,7 @@ src_configure() { --with-libc= --enable-loadable-sqlite-extensions --without-ensurepip + --without-lto --with-system-expat --with-system-ffi --with-platlibdir=lib @@ -286,7 +281,6 @@ src_configure() { --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip $(use_with debug assertions) - $(use_with lto) $(use_enable pgo optimizations) $(use_with readline readline "$(usex libedit editline readline)") $(use_with valgrind) @@ -295,6 +289,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 build_cbuild_python myeconfargs+=( diff --git a/dev-lang/python/python-3.12.1_p1.ebuild b/dev-lang/python/python-3.12.1_p1.ebuild index df871bbf0ed2..56041a87d6cc 100644 --- a/dev-lang/python/python-3.12.1_p1.ebuild +++ b/dev-lang/python/python-3.12.1_p1.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 libedit lto + bluetooth build debug +ensurepip examples gdbm libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind " RESTRICT="!test? ( test )" @@ -202,7 +202,6 @@ build_cbuild_python() { } src_configure() { - local disable # disable automagic bluetooth headers detection if ! use bluetooth; then local -x ac_cv_header_bluetooth_bluetooth_h=no @@ -211,11 +210,6 @@ src_configure() { append-flags -fwrapv 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 @@ -279,17 +273,26 @@ src_configure() { --with-libc= --enable-loadable-sqlite-extensions --without-ensurepip + --without-lto --with-system-expat --with-platlibdir=lib --with-pkg-config=yes --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip $(use_with debug assertions) - $(use_with lto) $(use_enable pgo optimizations) $(use_with readline readline "$(usex libedit editline readline)") $(use_with valgrind) ) + + # https://bugs.gentoo.org/700012 + if tc-is-lto; then + append-cflags $(test-flags-CC -ffat-lto-objects) + myeconfargs+=( + --with-lto + ) + fi + # Force-disable modules we don't want built. # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. cat > Modules/Setup.local <<-EOF || die diff --git a/dev-lang/python/python-3.13.0_alpha2.ebuild b/dev-lang/python/python-3.13.0_alpha2.ebuild index b2364be2514c..e38ba4022735 100644 --- a/dev-lang/python/python-3.13.0_alpha2.ebuild +++ b/dev-lang/python/python-3.13.0_alpha2.ebuild @@ -29,7 +29,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="PSF-2" SLOT="${PYVER}" IUSE=" - bluetooth build debug +ensurepip examples gdbm libedit lto + bluetooth build debug +ensurepip examples gdbm libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind " RESTRICT="!test? ( test )" @@ -201,7 +201,6 @@ build_cbuild_python() { } src_configure() { - local disable # disable automagic bluetooth headers detection if ! use bluetooth; then local -x ac_cv_header_bluetooth_bluetooth_h=no @@ -210,11 +209,6 @@ src_configure() { append-flags -fwrapv 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 @@ -278,17 +272,26 @@ src_configure() { --with-libc= --enable-loadable-sqlite-extensions --without-ensurepip + --without-lto --with-system-expat --with-platlibdir=lib --with-pkg-config=yes --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip $(use_with debug assertions) - $(use_with lto) $(use_enable pgo optimizations) $(use_with readline readline "$(usex libedit editline readline)") $(use_with valgrind) ) + + # https://bugs.gentoo.org/700012 + if tc-is-lto; then + append-cflags $(test-flags-CC -ffat-lto-objects) + myeconfargs+=( + --with-lto + ) + fi + # Force-disable modules we don't want built. # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. cat > Modules/Setup.local <<-EOF || die 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) diff --git a/dev-lang/python/python-3.9.18.ebuild b/dev-lang/python/python-3.9.18.ebuild index fcc54a9be7e6..9edf94c8ead2 100644 --- a/dev-lang/python/python-3.9.18.ebuild +++ b/dev-lang/python/python-3.9.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 +xml " RESTRICT="!test? ( test )" @@ -156,11 +156,6 @@ src_configure() { append-flags -fwrapv 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 @@ -218,12 +213,12 @@ 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 $(use_with debug assertions) - $(use_with lto) $(use_enable pgo optimizations) $(use_with valgrind) ) @@ -231,6 +226,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)