From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1598561-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 B420C15815E
	for <garchives@archives.gentoo.org>; Thu,  8 Feb 2024 11:03:00 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 06592E2A00;
	Thu,  8 Feb 2024 11:03:00 +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 D6531E2A00
	for <gentoo-commits@lists.gentoo.org>; Thu,  8 Feb 2024 11:02:59 +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))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id B0319343185
	for <gentoo-commits@lists.gentoo.org>; Thu,  8 Feb 2024 11:02:58 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 52AE7ACA
	for <gentoo-commits@lists.gentoo.org>; Thu,  8 Feb 2024 11:02:57 +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: <1707390136.b56417a1eb97d1b94d1f22ec87e76f2b47891ae4.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_pre20240204-r1.ebuild
X-VCS-Directories: sys-devel/gcc/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: b56417a1eb97d1b94d1f22ec87e76f2b47891ae4
X-VCS-Branch: master
Date: Thu,  8 Feb 2024 11:02:57 +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: 3a34c4e5-fe02-4900-84c8-9c8bad91db78
X-Archives-Hash: 3769a118ac4f35481320805262833b37

commit:     b56417a1eb97d1b94d1f22ec87e76f2b47891ae4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  8 11:01:13 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb  8 11:02:16 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b56417a1

sys-devel/gcc: backport more vectorisation fixes & postgres const expression fix

Bug: https://gcc.gnu.org/PR113808
Bug: https://gcc.gnu.org/PR113750
Bug: https://gcc.gnu.org/PR113731
Bug: https://gcc.gnu.org/PR113734 (should be same as PR113808)
Bug: https://gcc.gnu.org/PR113776
Closes: https://bugs.gentoo.org/923804
Closes: https://bugs.gentoo.org/923936
Signed-off-by: Sam James <sam <AT> gentoo.org>

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

diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index bbe2e8fdf66b..04da61e85911 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -37,6 +37,7 @@ DIST gcc-14.0.0-patches-11.tar.xz 11272 BLAKE2B 81c63b8aebcfd5b33b698ef4ef8f2d12
 DIST gcc-14.0.0-patches-16.tar.xz 11884 BLAKE2B bb47024c766f59222b50c5ff19ed6b763c9867508352cbcfc069d028d323a3b6fb3bbcbb2c08be7830f1ba266f54410842a17c9448c2bd9f101aa876ffb8f6ee SHA512 890a0b63485558eb2f1e9fea6a274e251442d129bcb67fd2ee11715916a6f8ea15bed0b59c72ed055fff5d6d90e2bfc3140ddee4e057af117d86fd6b7615fcbc
 DIST gcc-14.0.0-patches-18.tar.xz 13292 BLAKE2B daa75e2a96a816dc61068a4fb35b7bef6651eedeeaedc68e091f6d218f020d42b47389c5e4ded6037c9a1db22d3e3102934c4d96b1c96d894df8e50d25015f93 SHA512 35f1ba8624d3038b64c9eb8c83c6658d4f4d38ec12b527d70c044bc2f5a4b8f9749a11ecf506bc6b6720164209caeb285492a9403e78dbe05fd4512b8479eb89
 DIST gcc-14.0.0-patches-19.tar.xz 13348 BLAKE2B c006eff626131ff839330cab265c0183cfe04b116d9d1db40ce4126318dc688397b63991fbf014291df00edd533792efd196696de9305a89704ed929beb19f81 SHA512 9448bda7a5e932f32a507e7b8844e0d251b8e61911b12001948c10e96a8677147f95997c9aaf5838a6d8b134b513df5c0c0c690e47e7220882254894689289fe
+DIST gcc-14.0.0-patches-20.tar.xz 18184 BLAKE2B 7f17ca61ed2d7e131b6a742569dafb59058028ba3062e54a235cddccd76c77b9e36fc42efc4ca30e30b6112e08c8435b10d7acfef8191f1e089eb8d0c8b5c9d5 SHA512 dbfcab8ca728483d2f291339c22226f8f64cd56df96660cce963e3f86b267c42098e3f41c9b9758ad4d85e954466aecfdff8e68073145f52d31a387ef941f611
 DIST gcc-8.5.0-patches-4.tar.xz 18616 BLAKE2B 7594cbaea5daecf1a0b3d526c06aeba0a84c6da66aee2e105a51fda6be8d30a37ccc3814281b284a4582d892a1d556bca063551584edfc2525bed8ea5b6888e7 SHA512 1aa5742c361186637e7855f06feb1a4547e7d4d5de6e51f3d049e0ef3c19e2eff179465f52781739f59422035b7f8e4c0efa3844849f920f3c96acfdc37ca6a6
 DIST gcc-8.5.0.tar.xz 63841008 BLAKE2B aa81a1a730fd7371360f6abed6ba78b5843fd18c58d5de5687acc320741b9e430e85df3535a1ef7a26051409be8d2f0945f503e5968480d919103123a99d4b12 SHA512 92f599680e6b7fbce88bcdda810f468777d541e5fddfbb287f7977d51093de2a5178bd0e6a08dfe37090ea10a0508a43ccd00220041abbbec33f1179bfc174d8
 DIST gcc-9.5.0-patches-2.tar.xz 14324 BLAKE2B 1d3bf3e673108ad2fcdcb86daefb4603d1c9f6aa815e34d1591054d466b76d6f50cce124ab4760528c4951ea16eb00888a3e6485417f81ebf250548732df4a8e SHA512 a6d6f650aaf0bd193a17ac279649f0544a282cea295824384c59341c3000eac4b574b60e00dd427585d928f9768166abf85168b47772132790ad98854acacbbf

diff --git a/sys-devel/gcc/gcc-14.0.1_pre20240204-r1.ebuild b/sys-devel/gcc/gcc-14.0.1_pre20240204-r1.ebuild
new file mode 100644
index 000000000000..dbfcfddaacc4
--- /dev/null
+++ b/sys-devel/gcc/gcc-14.0.1_pre20240204-r1.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="20"
+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
+}