From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1734159-garchives=archives.gentoo.org@lists.gentoo.org>
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 finch.gentoo.org (Postfix) with ESMTPS id 8140F1581EE
	for <garchives@archives.gentoo.org>; Sat, 05 Apr 2025 00:25:09 +0000 (UTC)
Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189])
	(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)
	(Authenticated sender: relay-lists.gentoo.org@gentoo.org)
	by smtp.gentoo.org (Postfix) with ESMTPSA id 69D1434319C
	for <garchives@archives.gentoo.org>; Sat, 05 Apr 2025 00:25:09 +0000 (UTC)
Received: from bobolink.gentoo.org (localhost [127.0.0.1])
	by bobolink.gentoo.org (Postfix) with ESMTP id D32C21104B6;
	Sat, 05 Apr 2025 00:25:05 +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 bobolink.gentoo.org (Postfix) with ESMTPS id C8AAE1104B6
	for <gentoo-commits@lists.gentoo.org>; Sat, 05 Apr 2025 00:25:05 +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 51AEA343028
	for <gentoo-commits@lists.gentoo.org>; Sat, 05 Apr 2025 00:25:05 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 805F91AB2
	for <gentoo-commits@lists.gentoo.org>; Sat, 05 Apr 2025 00:25:03 +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: <1743812682.75c29ad34c295c87f87e69f39ae7e630f584b75f.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-13.3.1_p20250404.ebuild
X-VCS-Directories: sys-devel/gcc/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 75c29ad34c295c87f87e69f39ae7e630f584b75f
X-VCS-Branch: master
Date: Sat, 05 Apr 2025 00:25:03 +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: 7921aa90-acea-4438-96ea-41b5479853de
X-Archives-Hash: cd674b98e66b3d077c2bfb24cd4109d5

commit:     75c29ad34c295c87f87e69f39ae7e630f584b75f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  5 00:24:31 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Apr  5 00:24:42 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75c29ad3

sys-devel/gcc: add 13.3.1_p20250404

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

 sys-devel/gcc/Manifest                    |  1 +
 sys-devel/gcc/gcc-13.3.1_p20250404.ebuild | 69 +++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+)

diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 6989891b8672..22c1e17824cc 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -18,6 +18,7 @@ DIST gcc-13-20241220.tar.xz 84504500 BLAKE2B 60d6dcdcafa36399a0c0de7fef3a4eb4ca8
 DIST gcc-13-20250301.tar.xz 84525780 BLAKE2B c366f4de63b7956abb1bf2d1039acdf90c7a801adbb2793e4c199b0f743d143327aac9c2b078991f802da758ed4326dd913d9f60aec4fc471eff9af72f781a8e SHA512 075bfb3c5aeaf1c9bf7ab69ef117fcc1fd3ce1042edc9442d95df717e622c2ea9cfabbabf8be5eda32b3cf115d7d3e73907fd577a69f0beb6895f7ec2c5fc813
 DIST gcc-13-20250321.tar.xz 84515248 BLAKE2B b07d6f518bf2d32ad17b3c169ddb782dfe4de5efb157e2d4b8b2eb00f68f50b9250ba9e873b4dee269506740330176d98b1160d754ca6c714e1d6c76358c6493 SHA512 16a2acce5b2900749b7100a445ae387b03504a6e2319f76cd0a8a1d67eae8c04493f845f63e4e040d8fecba9123105d8b9fed433220e1fa6abc87448180dccd8
 DIST gcc-13-20250328.tar.xz 84532580 BLAKE2B e518053fd44461632560334c536ca29a3510493147bffba3906c3a9f2f08f4a124bd50132a0f2b82eb8a783fa3de58c5a41507c4558fd701d0cb9e2667526ad5 SHA512 277348fff14e1c44d32ffa717c9b2496fbf2975b95a237256a2c8585bbdba6b833b7212b0d9c59c3b430ebc98fe2866fe07e6acc429b09c0087e72da631f5ad3
+DIST gcc-13-20250404.tar.xz 84527280 BLAKE2B 1cd4592ccd2f0e6a712f74f5e7aa57f4b7cece92eb02cbb6049a11567a345589ee7993b81d2d9dc7b5cc1af8fe1d4350e3969377f4f389878d19eca7bf9520bc SHA512 7511736852972cae3578973ad11941cb9f758aea10e0b49cf4d67302bf0e4ad2c7b7ed4663e3d4c17ad6e350742b182652f8bfeb502134bf2e2b0d758037f0a9
 DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40e9149662b04f3ac7a7db3eb078d73a7b535726d1bf52e5b12736dedb2f9898ad731f2e48a6421fcfbf7b90f929dee072fcb SHA512 a691da0c87c443a5e9d23731f4005f27871c5b12bc9102873ffa24d374aa7b9fbd187c4f5635d23fa9ffb17e351e76173c2d3fdf40646e355c4cb314b538de69
 DIST gcc-13.2.0-patches-3.tar.xz 30956 BLAKE2B 29ce043b46645640ca1e983397af3e158588ad87575f0bc59451ea4a7dd5e3bb5b190ed031de6a22cd790d423ba111e95d222187dd09985dceb12db9f0a2d907 SHA512 4ffecae7be320124ad0c4e71e39e142b7aa8db0e70b5f486f491d7a33ea31efc6464c6abeea77df02a8bd5cf81f08225d625c8af5c27f9afa32c0d7d989f7a3c
 DIST gcc-13.2.0.tar.xz 87858592 BLAKE2B 0034b29d3d6cc05821f0c4253ce077805943aff7b370729dd203bda57d89c107edd657eeddc2fb1e69ea15c7b0323b961f46516c7f4af89a3ccf7fea84701be2 SHA512 d99e4826a70db04504467e349e9fbaedaa5870766cda7c5cab50cdebedc4be755ebca5b789e1232a34a20be1a0b60097de9280efe47bdb71c73251e30b0862a2

diff --git a/sys-devel/gcc/gcc-13.3.1_p20250404.ebuild b/sys-devel/gcc/gcc-13.3.1_p20250404.ebuild
new file mode 100644
index 000000000000..bdc9b8c2e5b6
--- /dev/null
+++ b/sys-devel/gcc/gcc-13.3.1_p20250404.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Maintenance notes and explanations of GCC handling are on the wiki:
+# https://wiki.gentoo.org/wiki/Project:Toolchain/sys-devel/gcc
+
+TOOLCHAIN_PATCH_DEV="sam"
+TOOLCHAIN_HAS_TESTS=1
+PATCH_GCC_VER="13.3.0"
+MUSL_GCC_VER="13.2.0"
+PATCH_VER="2"
+MUSL_VER="2"
+PYTHON_COMPAT=( python3_{10..13} )
+
+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 ~loong ~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}"
+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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+	eapply_user
+}