From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1677329-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 B1F7D15807A
	for <garchives@archives.gentoo.org>; Mon,  7 Oct 2024 04:13:05 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 60EE8E29AB;
	Mon,  7 Oct 2024 04:13:04 +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 34F30E29AB
	for <gentoo-commits@lists.gentoo.org>; Mon,  7 Oct 2024 04:13:04 +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 CA26534314F
	for <gentoo-commits@lists.gentoo.org>; Mon,  7 Oct 2024 04:13:02 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 212B51293
	for <gentoo-commits@lists.gentoo.org>; Mon,  7 Oct 2024 04:13:01 +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: <1728274361.fd01685ece15afd0a2f85471637a719002d46495.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
X-VCS-Repository: repo/gentoo
X-VCS-Files: eclass/toolchain.eclass
X-VCS-Directories: eclass/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: fd01685ece15afd0a2f85471637a719002d46495
X-VCS-Branch: master
Date: Mon,  7 Oct 2024 04:13:01 +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: 2c01cfe3-38e1-4f57-9b05-79b4230ea699
X-Archives-Hash: c4c1ed7c0302139f2eab2e392d06af66

commit:     fd01685ece15afd0a2f85471637a719002d46495
Author:     Andrei Horodniceanu <a.horodniceanu <AT> proton <DOT> me>
AuthorDate: Fri Oct  4 03:57:10 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct  7 04:12:41 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd01685e

toolchain.eclass: also clear GDCFLAGS when cross-compiling

sys-devel/gcc[d] uses GDCFLAGS when compiling the D parts. GDCFLAGS is
also used by ::dlang in a similar manner. The overlay suggests putting
in the variable similar values to CFLAGS so it's possible that it will
contain -march=native.

Because of this, add GDCFLAGS to the list of *FLAGS that are reset to
something that is understood by both the build and the host system when
cross-compiling.

Signed-off-by: Andrei Horodniceanu <a.horodniceanu <AT> proton.me>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/toolchain.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 5b978f6871db..0d46d6f3a799 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1948,6 +1948,7 @@ gcc_do_filter_flags() {
 		CFLAGS="-O2 -pipe"
 		FFLAGS=${CFLAGS}
 		FCFLAGS=${CFLAGS}
+		GDCFLAGS=${CFLAGS}
 
 		# "hppa2.0-unknown-linux-gnu" -> hppa2_0_unknown_linux_gnu
 		local VAR="CFLAGS_"${CTARGET//[-.]/_}