From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1593209-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 DD59015838C
	for <garchives@archives.gentoo.org>; Mon, 22 Jan 2024 04:56:51 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 108FBE29D2;
	Mon, 22 Jan 2024 04:56:51 +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 AA7F7E29D2
	for <gentoo-commits@lists.gentoo.org>; Mon, 22 Jan 2024 04:56:50 +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 729C634321B
	for <gentoo-commits@lists.gentoo.org>; Mon, 22 Jan 2024 04:56:49 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id B432F105D
	for <gentoo-commits@lists.gentoo.org>; Mon, 22 Jan 2024 04:56:47 +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: <1705899390.77a9314cece73d71ceec164369789b08e744a252.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.1_pre20240121.ebuild
X-VCS-Directories: sys-devel/gcc/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 77a9314cece73d71ceec164369789b08e744a252
X-VCS-Branch: master
Date: Mon, 22 Jan 2024 04:56:47 +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: e7347635-31db-41f4-a320-109bd6433e52
X-Archives-Hash: 248a7d3e8d155eb33191ca6b36dd6bbc

commit:     77a9314cece73d71ceec164369789b08e744a252
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 22 04:56:08 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 22 04:56:30 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77a9314c

sys-devel/gcc: add 14.0.1_pre20240121

Includes a workaround for bug #922195.

Closes: https://bugs.gentoo.org/922195
Closes: https://bugs.gentoo.org/922580
Signed-off-by: Sam James <sam <AT> gentoo.org>

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

diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 8c7140eda6fa..b2279d44b23b 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -36,6 +36,7 @@ DIST gcc-14-20231224.tar.xz 87027056 BLAKE2B 412a0e8c82063f3aac828620648e5a57942
 DIST gcc-14-20231231.tar.xz 87027004 BLAKE2B 55c12dea8b446793667220dd17a75f3081f1ca6608654f1d2c5860f65d757efa4dcd044e9f15373ec7afc89c475876502529abbb96ddaac77206c0a63ff23882 SHA512 79a704d54bd8ace8ebfbf720dca71c70dc7c1d0c70f8f586f70fb476006317846aa29a4754a3f34ebbbe436f4e548a4837f778bacb86f97d8bfc03627bfcaf03
 DIST gcc-14-20240107.tar.xz 87072048 BLAKE2B a605ea26af2e98c17f8efd742e8adc27f03a183d77b107ef74b30183542d44d68ee88cb975af1c45c6098f97b34aa9870302450de0c848832ebf49a4533c20c6 SHA512 6e8ec11feeca073bc4c24aca3d7ada4ec66780ec00735deab48df050d3efa1bfe8bfe7a7c58ab7ada4f585ef829b49ef80203e3251fc4e6bca0d0932ab2fb313
 DIST gcc-14-20240114.tar.xz 87220100 BLAKE2B 96d5196f07b7ca310baf800d2406dbf1a07eb85d6678ca16387551e04bd94f975dab817c7dd171a9e846c032f17c27b7141f5815322a4a3cf4dd3d1b5f583179 SHA512 422b81c9a7ac560865e6d1b1ad94c5bf269ab33ec4cf6e88874a1652c6e911877e926ad7a8bb2d79112eb175dbe6636e640b42fce2b6de7c7fc4f1d10db31d15
+DIST gcc-14-20240121.tar.xz 87469416 BLAKE2B a146f6f62775d2ad82f93dba0581b3aee162113cb0a1ed9fa3db6a8cfc08415555edb0dd0b24d6f4676b91d644d2096ffe22de3c03c8f88b7d6e480515601737 SHA512 af6b623bba274970c58da8cd4a5f329a2b2973cb108e7dc7a910358d7bffb89b8f33437d47d7f10a1ceeafd744f099677621f3c3fac65e54aad1ea4045d19743
 DIST gcc-14.0.0-musl-patches-1.tar.xz 3576 BLAKE2B 692baee8a7709905d53aeb150d73a3721c4ba47ee5f397cfb1b5be905cf003ca02b60c94ee294d90ac39645cd5cdf186c7a3aa950c47d8cf680c128ed705b807 SHA512 0592ab98a7142e404623a6511c67dff61e9ade32c3fb2c0e75b456306e0af3799ad13252b50b3d2fdd31e5815d7f0b16b0ad63ab8386fe4d78729fc9c182d617
 DIST gcc-14.0.0-patches-11.tar.xz 11272 BLAKE2B 81c63b8aebcfd5b33b698ef4ef8f2d12b94ea2753ecec2b160cf9fab534dccd12875bcb16cfac2aa81211f8d9ff530cfc18f486567721beac487e08daa62363e SHA512 0f51352cbc6815cd1dbc8b73e9c83842a58242220ba712291cc76c08c19b3a612c88a3221b2da437a9c7ecb410a83c2e538aa1984b733f444843bdf79d314a71
 DIST gcc-14.0.0-patches-13.tar.xz 47572 BLAKE2B 8f0fc6ba8f9310eab3f6b568ffce39f64e399552ed5c9fdd261e3cc9292200e7ab66724872b392f64bd9bf05ddf9a1fd26ba4092a98d991202b4f6a28861a829 SHA512 a56abdd95f03ed0586df709fdc28cc6af4573465b99750502986efd7f0ce73fd8ab455fdb9621d9227e835721be3cf42a9997a97eacf148b8a0dcf3ba44cc5be

diff --git a/sys-devel/gcc/gcc-14.0.1_pre20240121.ebuild b/sys-devel/gcc/gcc-14.0.1_pre20240121.ebuild
new file mode 100644
index 000000000000..777f9c46c49d
--- /dev/null
+++ b/sys-devel/gcc/gcc-14.0.1_pre20240121.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="14.0.0"
+PATCH_VER="16"
+MUSL_VER="1"
+MUSL_GCC_VER="14.0.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=master
+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
+}