From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1518599-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 8186515806E
	for <garchives@archives.gentoo.org>; Mon, 15 May 2023 00:44:30 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id A1DB5E0826;
	Mon, 15 May 2023 00:44:29 +0000 (UTC)
Received: from smtp.gentoo.org (dev.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 671DCE0823
	for <gentoo-commits@lists.gentoo.org>; Mon, 15 May 2023 00:44:29 +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 4D1D433BE61
	for <gentoo-commits@lists.gentoo.org>; Mon, 15 May 2023 00:44:28 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 85E4A920
	for <gentoo-commits@lists.gentoo.org>; Mon, 15 May 2023 00:44:26 +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: <1684111456.93729fb864152e102ea1b0278ad2140f302341fc.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-14.0.0_pre20230514.ebuild
X-VCS-Directories: sys-devel/gcc/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 93729fb864152e102ea1b0278ad2140f302341fc
X-VCS-Branch: master
Date: Mon, 15 May 2023 00:44:26 +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: c876a477-0482-46a4-8275-ad56f302ff0a
X-Archives-Hash: ca8e7bb7e433171456185164882d69ad

commit:     93729fb864152e102ea1b0278ad2140f302341fc
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May 15 00:40:01 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 15 00:44:16 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93729fb8

sys-devel/gcc: add 14.0.0_pre20230514

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

 sys-devel/gcc/Manifest                      |  1 +
 sys-devel/gcc/gcc-14.0.0_pre20230514.ebuild | 63 +++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+)

diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index b4149eabaf23..b41736dddbbc 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -21,6 +21,7 @@ DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40
 DIST gcc-13.2.0-patches-1.tar.xz 15792 BLAKE2B 2ffa9ac013c0f9a91eb93e87e3bc6c378d02cca32ad3f8a84d1249e257eb02b206ec10fa425738a4bae2ffb7db8506afcee2a8dd855357e4b48636608aa24e50 SHA512 917ea178f3696724f9ec08aebb6976f03c5edf8ee21bb4bad7e2d820507452f6dace6e847c4f342a52870642550f34da0346ee635a60ba0c1bff667e0e31d195
 DIST gcc-13.2.0-patches-2.tar.xz 12392 BLAKE2B 40ca4c230166e39d237e4b939669e51b991f58d0e1787c43f2bf468447de478604d28b6e9b20f5991bd01b9efad4860b30567c8df5d823cf6fc47678f9e6b672 SHA512 d00f559b2d6ad98f97a9328d2ce1593553fff727033690dfc13f520775e977b674fe14cc1ec7ab52b246e091a055812eaf4f93306145a4d2ad87a55707a3717b
 DIST gcc-14-20230507.tar.xz 84069364 BLAKE2B 579df5cf4b0d16aa29248259e235dd7c05454c8c5b999928cbf200d52997e0615391e06308e9e0a72f7a1f1903cb86305137eceb97cd8ddd0cf40b4a21a05a86 SHA512 1598b9565bc9554e91d5be2b58d8c0861b72e97b79aa952c084ae4731c0cd1ca37d107a70b6a26235bf59322c1f4de435389906b4fe6f29b6e65e1b566aff5ea
+DIST gcc-14-20230514.tar.xz 84081088 BLAKE2B e385298bac832374a4773bb4a30fa42f66262378417ce3850c62d69300c76e7a9feae8fb51285edabd9ffed423ac4b688c52bc18d76aa700f255e951ca60f237 SHA512 839a7fbe1210f54b0bcb26e10f9ac26d262924f8d19eef62e33a8bc066c00a549a0b49cff088f5e23656c66f26a28c0721e376cfdd97a54f6a9b2ba3680f5e01
 DIST gcc-14.0.0-musl-patches-1.tar.xz 3576 BLAKE2B 692baee8a7709905d53aeb150d73a3721c4ba47ee5f397cfb1b5be905cf003ca02b60c94ee294d90ac39645cd5cdf186c7a3aa950c47d8cf680c128ed705b807 SHA512 0592ab98a7142e404623a6511c67dff61e9ade32c3fb2c0e75b456306e0af3799ad13252b50b3d2fdd31e5815d7f0b16b0ad63ab8386fe4d78729fc9c182d617
 DIST gcc-14.0.0-patches-1.tar.xz 11612 BLAKE2B a3b0f3952cf7a6fb095817f4727ccb5cff24607a5c2bb67d280da4651177132ddcf398243998271c509ccaf3445d4843ff691a12d5c394dad8d9c70fc4a8120d SHA512 66701c2e4fd1a031ffcb353a3a9cd1fe25d3d62167065523097e41a3e48adf4218ecf08e382e3ea22014c561ba3a15681650c5538cda91d38c69cbbf04503a74
 DIST gcc-8.5.0-patches-4.tar.xz 18616 BLAKE2B 7594cbaea5daecf1a0b3d526c06aeba0a84c6da66aee2e105a51fda6be8d30a37ccc3814281b284a4582d892a1d556bca063551584edfc2525bed8ea5b6888e7 SHA512 1aa5742c361186637e7855f06feb1a4547e7d4d5de6e51f3d049e0ef3c19e2eff179465f52781739f59422035b7f8e4c0efa3844849f920f3c96acfdc37ca6a6

diff --git a/sys-devel/gcc/gcc-14.0.0_pre20230514.ebuild b/sys-devel/gcc/gcc-14.0.0_pre20230514.ebuild
new file mode 100644
index 000000000000..1b25d3519a6e
--- /dev/null
+++ b/sys-devel/gcc/gcc-14.0.0_pre20230514.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_VER="1"
+PATCH_GCC_VER="14.0.0"
+MUSL_VER="1"
+MUSL_GCC_VER="14.0.0"
+
+if [[ $(ver_cut 3) == 9999 ]] ; then
+	MY_PV_2=$(ver_cut 2)
+	MY_PV_3=$(($(ver_cut 3) - 9998))
+	if [[ ${MY_PV_2} == 0 ]] ; then
+		MY_PV_2=0
+		MY_PV_3=0
+	else
+		MY_PV_2=$(($(ver_cut 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
+
+# Needs to be after inherit (for now?), bug #830908
+#EGIT_BRANCH=master
+
+# Don't keyword live ebuilds
+#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+#	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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}"
+	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
+}