From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1675316-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) server-digest SHA256)
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id E614915808B
	for <garchives@archives.gentoo.org>; Wed,  2 Oct 2024 00:53:40 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id D904BE29A4;
	Wed,  2 Oct 2024 00:53:39 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(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 B8198E29A4
	for <gentoo-commits@lists.gentoo.org>; Wed,  2 Oct 2024 00:53:39 +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 BF98E33BEFF
	for <gentoo-commits@lists.gentoo.org>; Wed,  2 Oct 2024 00:53:38 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 16FCC1A09
	for <gentoo-commits@lists.gentoo.org>; Wed,  2 Oct 2024 00:53:37 +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: <1727830330.db06a6d8427025c96b4f1ddccd1fdb40f8c14219.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/gnat-gpl/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-lang/gnat-gpl/gnat-gpl-2021-r5.ebuild
X-VCS-Directories: dev-lang/gnat-gpl/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: db06a6d8427025c96b4f1ddccd1fdb40f8c14219
X-VCS-Branch: master
Date: Wed,  2 Oct 2024 00:53:37 +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: 85d32038-9242-4647-b3ab-c5c40321574e
X-Archives-Hash: 5f1f516abcccffa16e286179ae5c8b4d

commit:     db06a6d8427025c96b4f1ddccd1fdb40f8c14219
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Oct  2 00:51:28 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct  2 00:52:10 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db06a6d8

dev-lang/gnat-gpl: strip unsupported flags, etc.

Same as we do in dev-lang/ada-bootstrap -- this is very brittle
and we want to do as much as we can to keep it working.

See 9a089ae37edf29aa5956932209751379a1bceb21 too.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/gnat-gpl/gnat-gpl-2021-r5.ebuild | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/dev-lang/gnat-gpl/gnat-gpl-2021-r5.ebuild b/dev-lang/gnat-gpl/gnat-gpl-2021-r5.ebuild
index d3fa9bbf092e..442fabf6223f 100644
--- a/dev-lang/gnat-gpl/gnat-gpl-2021-r5.ebuild
+++ b/dev-lang/gnat-gpl/gnat-gpl-2021-r5.ebuild
@@ -35,7 +35,7 @@ GCC_TARBALL_SRC_URI="
 		)
 	)"
 
-inherit toolchain-funcs toolchain
+inherit flag-o-matic toolchain-funcs toolchain
 
 DESCRIPTION="GNAT Ada Compiler - GPL version"
 HOMEPAGE="http://libre.adacore.com/"
@@ -145,7 +145,15 @@ src_prepare() {
 
 src_configure() {
 	export PATH=${PWD}/bin:${PATH}
+
+	# This version is GCC 4.7.4 with a bolted-on newer GNAT; be very
+	# conservative, we just want it to build for bootstrapping proper
+	# sys-devel/gcc[ada]. We don't need it to be fast.
+	strip-flags
+	strip-unsupported-flags
+	filter-lto
 	downgrade_arch_flags "$(gcc-version)"
+
 	toolchain_src_configure
 }