From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1539324-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 1821815801B
	for <garchives@archives.gentoo.org>; Fri, 21 Jul 2023 23:49:16 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 3D8FBE0943;
	Fri, 21 Jul 2023 23:49:15 +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))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 20EE0E0943
	for <gentoo-commits@lists.gentoo.org>; Fri, 21 Jul 2023 23:49:15 +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 01C74340ADB
	for <gentoo-commits@lists.gentoo.org>; Fri, 21 Jul 2023 23:49:14 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 642FDBEF
	for <gentoo-commits@lists.gentoo.org>; Fri, 21 Jul 2023 23:49:12 +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: <1689981793.78c494ec181cf118d20537ac82cb762242cf1ffc.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/gcc/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-devel/gcc/Manifest sys-devel/gcc/gcc-12.3.1_p20230721.ebuild
X-VCS-Directories: sys-devel/gcc/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 78c494ec181cf118d20537ac82cb762242cf1ffc
X-VCS-Branch: master
Date: Fri, 21 Jul 2023 23:49:12 +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: b25dcd69-7db8-473e-ba92-47a21b8265de
X-Archives-Hash: 541a1e2a98c9e6aad1c1ce17a30a1489

commit:     78c494ec181cf118d20537ac82cb762242cf1ffc
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 21 22:49:08 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul 21 23:23:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78c494ec

sys-devel/gcc: add 12.3.1_p20230721

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

 sys-devel/gcc/Manifest                    |  1 +
 sys-devel/gcc/gcc-12.3.1_p20230721.ebuild | 64 +++++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+)

diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 6ba8bec3a355..c5228c36fa02 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -15,6 +15,7 @@ DIST gcc-12-20230428.tar.xz 79744932 BLAKE2B f9d0000cdd2f1b0af79f281851b3b0fe0ac
 DIST gcc-12-20230526.tar.xz 79780444 BLAKE2B 6f6eca272ab506e16a231003c399e28572595c82fbaaec9deb14b78ff9fc493fb24afe1c375d4f2fd75e9813805934857ef2ceb6c05b7977dbfe2e50abdc3ec9 SHA512 fb190ce5bf3d38a1899016475c1551550d44c6f71f1f1a71ced545cbb2aff0446bd2765230b0920379579a13103a507ffc1e197ac69afb0a4f08efe11b50918d
 DIST gcc-12-20230623.tar.xz 79782948 BLAKE2B 6eeabdd1495482b8bc5a6f2f90cd7d7967b66664d277c5f755f1ee98ac2c99db1552ab13b1c69f4c47d1d0b8de584e6a5f024b45e3c5934f49179cf65ca30acc SHA512 09aa0304a8a916aea7a4714eb3a7541b2015e3bdb8ae9bd40bc289553c4ec86f91b054925d2af45f33af9d20a7422949e691c0f552d68ee1d5206b4007310a88
 DIST gcc-12-20230714.tar.xz 79794260 BLAKE2B add530733b1b84b594439a6f8029fb65132ae2903e5b2b6b1562d8f784571f84a0ef11183e52fbbf4fcf17950aad1cf7e90cdac54982300ef92e1e5ce4db1380 SHA512 ea8e4fa199028979efadebc85ef7d73efbc7eeca04ad61a5bb11dfea8014701c2848a908f22d37df99bd437f7977a45f3148c7aed652e91f2e8fa6866e7daa8c
+DIST gcc-12-20230721.tar.xz 79790360 BLAKE2B 12f575ce59278989ca8a15ca645c70201698692418963d1abb7ad06a5460077b025d20f3dca1fe3b03bfb069e9e811b51e38021e8f85212755debee2b1563429 SHA512 7e621297d908d66c168147235d4649b06ff307d16d949e963aac1a52b1982b75acee5ee87b7dce8d65eb560ae174f23e76584b3ae7797a37f8f4bb10bc6bd0b7
 DIST gcc-12.3.0-musl-patches-1.tar.xz 3572 BLAKE2B c7bf65f7c9ea8023ddaac821ee2b778622fa310ac72a72b2f7032494a8f304eac86217f9204622e6c21aaef9952bece0d09bc126facd4f42b602927909815ab5 SHA512 babc279fea2c1fd4c018815f2f5630214fd46015ce9f365c28af242681d51818eaca30ce298eddcab1eed5ac5f2759e2b47b2335afab9d722b4469a6d4fec326
 DIST gcc-12.3.0-patches-2.tar.xz 14236 BLAKE2B 06c43662c9abb0fa3cf90d5e2273c69aecb9158e6cf6f23c04754ed5d686be2616e81e2502eb16f4298ddd50518ca7677e13249da9e9b091162d3931ff65e4fe SHA512 b0d4b85dbf1a54aaaa1997203b872e3106906b4ad49cde57e1428bc22b2f8e2d73b8cb10ae0d0b792aebaf664594da4d1dea04c44ddc34e59047410766db04d1
 DIST gcc-13-20230527.tar.xz 83956360 BLAKE2B 86a2131b88144817673a6300c73b29c2dbb8559a7057609601029aaf60aeb4c4926fa4b99c4e1768726cde09f994159685768b62b3ca73d7b606847788301e82 SHA512 87566c74258f9981742eae77f552361c220f79fa6f17c36d5b5a9e73f41c50d8a2cab16b9ffb17f07829005f0d42b4b1d524150d3dcba9710091532cbfad7152

diff --git a/sys-devel/gcc/gcc-12.3.1_p20230721.ebuild b/sys-devel/gcc/gcc-12.3.1_p20230721.ebuild
new file mode 100644
index 000000000000..1ffe2b97a4bf
--- /dev/null
+++ b/sys-devel/gcc/gcc-12.3.1_p20230721.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="12.3.0"
+PATCH_VER="2"
+MUSL_VER="1"
+MUSL_GCC_VER="12.3.0"
+
+if [[ ${PV} == *.9999 ]] ; then
+	MY_PV_2=$(ver_cut 2)
+	MY_PV_3=1
+	if [[ ${MY_PV_2} == 0 ]] ; then
+		MY_PV_2=0
+		MY_PV_3=0
+	else
+	        MY_PV_2=$((${MY_PV_2} - 1))
+	fi
+
+	# e.g. 12.2.9999 -> 12.1.1
+	TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+	# Cheesy hack for RCs
+	MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+	MY_P=${PN}-${MY_PV}
+	GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+	TOOLCHAIN_SET_S=no
+	S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+	# Needs to be after inherit (for now?), bug #830908
+	EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+	# Don't keyword live ebuilds
+	#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+	:;
+fi
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+	# Technically only if USE=hardened *too* right now, but no point in complicating it further.
+	# If GCC is enabling CET by default, we need glibc to be built with support for it.
+	# bug #830454
+	RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+	DEPEND="${RDEPEND}"
+	BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
+fi
+
+src_prepare() {
+	local p upstreamed_patches=(
+		# add them here
+	)
+	for p in "${upstreamed_patches[@]}"; do
+		rm -v "${WORKDIR}/patch/${p}" || die
+	done
+
+	toolchain_src_prepare
+
+	eapply_user
+}