From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1449753-garchives=archives.gentoo.org@lists.gentoo.org>
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))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 35A6B158020
	for <garchives@archives.gentoo.org>; Tue, 25 Oct 2022 11:06:36 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 2B7A1E0AFD;
	Tue, 25 Oct 2022 11:06:35 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.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 14D22E0AFD
	for <gentoo-commits@lists.gentoo.org>; Tue, 25 Oct 2022 11:06:35 +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 271AF3412A7
	for <gentoo-commits@lists.gentoo.org>; Tue, 25 Oct 2022 11:06:34 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 5CF7C62C
	for <gentoo-commits@lists.gentoo.org>; Tue, 25 Oct 2022 11:06:32 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1666695953.ddbae51c4cfc2f579deb0294f82f20e0609c4353.sam@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.8.ebuild dev-lang/python/python-3.11.0.ebuild dev-lang/python/python-3.8.15.ebuild dev-lang/python/python-3.9.15.ebuild
X-VCS-Directories: dev-lang/python/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: ddbae51c4cfc2f579deb0294f82f20e0609c4353
X-VCS-Branch: master
Date: Tue, 25 Oct 2022 11:06:32 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 7e299851-5045-4d41-8ea7-fddc0c1ecd3e
X-Archives-Hash: 173c7166f94931584a7bf832731f75c1

commit:     ddbae51c4cfc2f579deb0294f82f20e0609c4353
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 25 11:05:34 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct 25 11:05:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddbae51c

dev-lang/python: fix CFLAGS for cross-compilation

My CFLAGS for sparc etc were the same (generic) as for CBUILD, so didn't
notice before.

Closes: https://bugs.gentoo.org/878211
Fixes: 29d2314810bd8e1de73df5c3ebe30c826281c253
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/python/python-3.10.8.ebuild | 17 ++++++++++++-----
 dev-lang/python/python-3.11.0.ebuild | 17 ++++++++++++-----
 dev-lang/python/python-3.8.15.ebuild | 17 ++++++++++++-----
 dev-lang/python/python-3.9.15.ebuild | 12 ++++++++++++
 4 files changed, 48 insertions(+), 15 deletions(-)

diff --git a/dev-lang/python/python-3.10.8.ebuild b/dev-lang/python/python-3.10.8.ebuild
index 625f41d24ffb..0b7ad7f2c527 100644
--- a/dev-lang/python/python-3.10.8.ebuild
+++ b/dev-lang/python/python-3.10.8.ebuild
@@ -231,13 +231,14 @@ src_configure() {
 
 	# disable implicit optimization/debugging flags
 	local -x OPT=
-	# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
-	# propagated to sysconfig for built extensions
-	local -x CFLAGS_NODIST=${CFLAGS}
-	local -x LDFLAGS_NODIST=${LDFLAGS}
-	local -x CFLAGS= LDFLAGS=
 
 	if tc-is-cross-compiler ; then
+		# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
+		# propagated to sysconfig for built extensions
+		local -x CFLAGS_NODIST=${CFLAGS_FOR_BUILD}
+		local -x LDFLAGS_NODIST=${LDFLAGS_FOR_BUILD}
+		local -x CFLAGS= LDFLAGS=
+
 		# We need to build our own Python on CBUILD first, and feed it in.
 		# bug #847910 and bug #864911.
 		local myeconfargs_cbuild=(
@@ -282,6 +283,12 @@ src_configure() {
 		popd &> /dev/null || die
 	fi
 
+	# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
+	# propagated to sysconfig for built extensions
+	local -x CFLAGS_NODIST=${CFLAGS}
+	local -x LDFLAGS_NODIST=${LDFLAGS}
+	local -x CFLAGS= LDFLAGS=
+
 	econf "${myeconfargs[@]}"
 
 	if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then

diff --git a/dev-lang/python/python-3.11.0.ebuild b/dev-lang/python/python-3.11.0.ebuild
index 9ec51be261e6..ab0050062031 100644
--- a/dev-lang/python/python-3.11.0.ebuild
+++ b/dev-lang/python/python-3.11.0.ebuild
@@ -220,13 +220,14 @@ src_configure() {
 
 	# disable implicit optimization/debugging flags
 	local -x OPT=
-	# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
-	# propagated to sysconfig for built extensions
-	local -x CFLAGS_NODIST=${CFLAGS}
-	local -x LDFLAGS_NODIST=${LDFLAGS}
-	local -x CFLAGS= LDFLAGS=
 
 	if tc-is-cross-compiler ; then
+		# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
+		# propagated to sysconfig for built extensions
+		local -x CFLAGS_NODIST=${CFLAGS_FOR_BUILD}
+		local -x LDFLAGS_NODIST=${LDFLAGS_FOR_BUILD}
+		local -x CFLAGS= LDFLAGS=
+
 		# We need to build our own Python on CBUILD first, and feed it in.
 		# bug #847910
 		local myeconfargs_cbuild=(
@@ -274,6 +275,12 @@ src_configure() {
 		popd &> /dev/null || die
 	fi
 
+	# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
+	# propagated to sysconfig for built extensions
+	local -x CFLAGS_NODIST=${CFLAGS}
+	local -x LDFLAGS_NODIST=${LDFLAGS}
+	local -x CFLAGS= LDFLAGS=
+
 	econf "${myeconfargs[@]}"
 
 	if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then

diff --git a/dev-lang/python/python-3.8.15.ebuild b/dev-lang/python/python-3.8.15.ebuild
index 521277294b91..c45c62c2e163 100644
--- a/dev-lang/python/python-3.8.15.ebuild
+++ b/dev-lang/python/python-3.8.15.ebuild
@@ -184,13 +184,14 @@ src_configure() {
 
 	# disable implicit optimization/debugging flags
 	local -x OPT=
-	# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
-	# propagated to sysconfig for built extensions
-	local -x CFLAGS_NODIST=${CFLAGS}
-	local -x LDFLAGS_NODIST=${LDFLAGS}
-	local -x CFLAGS= LDFLAGS=
 
 	if tc-is-cross-compiler ; then
+		# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
+		# propagated to sysconfig for built extensions
+		local -x CFLAGS_NODIST=${CFLAGS_FOR_BUILD}
+		local -x LDFLAGS_NODIST=${LDFLAGS_FOR_BUILD}
+		local -x CFLAGS= LDFLAGS=
+
 		# We need to build our own Python on CBUILD first, and feed it in.
 		# bug #847910 and bug #864911.
 		local myeconfargs_cbuild=(
@@ -235,6 +236,12 @@ src_configure() {
 		popd &> /dev/null || die
 	fi
 
+	# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
+	# propagated to sysconfig for built extensions
+	local -x CFLAGS_NODIST=${CFLAGS}
+	local -x LDFLAGS_NODIST=${LDFLAGS}
+	local -x CFLAGS= LDFLAGS=
+
 	econf "${myeconfargs[@]}"
 
 	if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then

diff --git a/dev-lang/python/python-3.9.15.ebuild b/dev-lang/python/python-3.9.15.ebuild
index 05ce9ad53913..71160d6e637f 100644
--- a/dev-lang/python/python-3.9.15.ebuild
+++ b/dev-lang/python/python-3.9.15.ebuild
@@ -232,6 +232,12 @@ src_configure() {
 	local -x CFLAGS= LDFLAGS=
 
 	if tc-is-cross-compiler ; then
+		# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
+		# propagated to sysconfig for built extensions
+		local -x CFLAGS_NODIST=${CFLAGS_FOR_BUILD}
+		local -x LDFLAGS_NODIST=${LDFLAGS_FOR_BUILD}
+		local -x CFLAGS= LDFLAGS=
+
 		# We need to build our own Python on CBUILD first, and feed it in.
 		# bug #847910 and bug #864911.
 		local myeconfargs_cbuild=(
@@ -276,6 +282,12 @@ src_configure() {
 		popd &> /dev/null || die
 	fi
 
+	# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
+	# propagated to sysconfig for built extensions
+	local -x CFLAGS_NODIST=${CFLAGS}
+	local -x LDFLAGS_NODIST=${LDFLAGS}
+	local -x CFLAGS= LDFLAGS=
+
 	econf "${myeconfargs[@]}"
 
 	if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then