summaryrefslogtreecommitdiff
path: root/sys-devel/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/gcc')
-rw-r--r--sys-devel/gcc/Manifest2
-rw-r--r--sys-devel/gcc/files/gcc-12.3-ccache-ICE.patch67
-rw-r--r--sys-devel/gcc/gcc-12.3.1_p20230512-r1.ebuild57
3 files changed, 126 insertions, 0 deletions
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 5ca06189e9c3..fdda66fc896c 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -1,3 +1,4 @@
+AUX gcc-12.3-ccache-ICE.patch 2129 BLAKE2B 29d5b55ed17b299d58dc2f22310aacfa443e05f28e7400fedf0e050daec9041b3dc32c3765c8fdf8d872294fb712c0c488d109efcdf6cfb6691e24b775de94a1 SHA512 58c68b982281b06bb707dc19465985da71e2d4b55e4b25fb63ec37ddfdc1337ac5bd67c5f5a75244b46630e9b1ca7321a3da38de89e31c278de8459608b88377
AUX gcc-13-fix-cross-fixincludes.patch 792 BLAKE2B f16dcfee5760380931642520bf7ae939a22131183dec4f9515cabeabaa2eafbc339d4f8bdc0605bda45d840876cb8720264c4612d99510b4d7a2e4132db2403e SHA512 d65061e07c5f3089a9d39edafed94c39082dbb254cfebb386fa2fce5374e54e3e1e15a84f0de96adbe1c5ebfc33a5dad10ecbd3db851f852ec1a7521b8940fc5
AUX gcc-configure-LANG.patch 2052 BLAKE2B 28c36f4992e41305ee421dade5eaaac34e3bdc523665b03f360f2bc01e8f69e9dc48052edb80dece63ab561e80325b4f125502482eb16f7324f1c03670021550 SHA512 a694c7ac2f45cc657097ff5b0cf1356ac88a9c06035c9ba15167e9d444844d0d8a478eb1b9b62195dd063774f79697b9148b9cdb6c261640b472c291061b2129
AUX gcc-configure-texinfo.patch 341 BLAKE2B d2ea3b2ea08f5d3a498ba27d0fb95e325097e2104e55caa28b66515cb48662649140d90b639369aedc54b2b1178fa4b49cda442f5f504e09d88a2efa45a5057c SHA512 e8d34c5077409df5495cf0c5fbf5e77f841c5698108fa6a5fde33eb28202c685603bdefd8368918e55f30c4b995e895d71d64c715c1ec2b017e09eb2c54c09ff
@@ -41,6 +42,7 @@ EBUILD gcc-11.3.1_p20230511.ebuild 1346 BLAKE2B 278dd8483ef6034566c4ae12f9dfde8a
EBUILD gcc-11.4.9999.ebuild 1315 BLAKE2B 45a8f481e0c08e5274d1797e421431e898753fce22426a1b2a1f4fd23c4dd44bed5f15da4c67f1c108b25d8393683fef631f998b8b524aa0d356be04625c0562 SHA512 fc4d8913f2aeed856b123a4545655813fe20544d841feca5121f85291a2aec99c770d845b14ce936c2fb14b5b9b1cd85166190ec657528bcb1710c7b48385c16
EBUILD gcc-12.2.1_p20230428-r1.ebuild 1475 BLAKE2B 69112653719b589bd72fe454b963d050194a8dc3a665fc7317989368cf0ff4281ac2f8519d7fc46311a3f91528d2e0457485357e67ff72765d6cfe743f0b4a2c SHA512 2e771e67e1668bf90695cc42517f46518e445a4af6e7cb9c8532efea047a4174d40f18b256cc99beec2b5fe5abde4f1ea7cb3ad84f4491032036d6b53f941e91
EBUILD gcc-12.3.0.ebuild 1581 BLAKE2B a5895792b8a60592ed888bd9219f85fcbe71a26ac1351e4c393753da80263b9ec2937573e9a23de51b40666d7dc1fc3f78f27eeedc31a9b3a6cce3baed91e2b9 SHA512 eacce837d30335396e5ca78b53f3cb23fd181a132cdc832ecc31353ce71e599b5e43ac6333769b70bd084cace3ae96b551216b3e53b892a0b0f93465f5465edf
+EBUILD gcc-12.3.1_p20230512-r1.ebuild 1634 BLAKE2B 3e7b0e5598211134833ad2f5913a6ba83dee87002638ef5cf01a9d8832a72ec070ebc47f7949a208c34abae83e02e08c17ca14ae44a11877c597f184d69b87a0 SHA512 195b4d682bb3de92aea09dbf32b8200d906132b76fd6a9d3e7ac328a27637c760b335675c5f35ba970a1c03c93843046ab194dfe6cad975fdf83052192ceca9f
EBUILD gcc-12.3.1_p20230512.ebuild 1584 BLAKE2B f59f298e274530f8bd4f2870c1429f9ab97dc67fb3d096383cab7851c23668bfe8b6157ae23bf019e7698b16ec0317cb8a2db26a335068197d476fb580f32ad2 SHA512 d8222c1ec284a21cbbd756faa37561106b58ae8e3b09511c10ed1cdf61c4a5aba68b1914936c7b47999f963badd4f60929a3928d73261b84b33170c3b1080bbd
EBUILD gcc-12.4.9999.ebuild 1593 BLAKE2B 8246fe30de8cf3d515b1c5c23eea470de257aecc452fcce47e72497b310c62893c39275db02245a12a258b06c4ddd695a8346c9b539efca2a8e1d64aab0a8955 SHA512 a0fa5d4f5e6d1545e13d33b6fa45709f7dc5fccf026d060eef26752d7000c21b913276609abb6b174b2d04e08de3c61f8c4b126acbb196c767a8886ab7999ebb
EBUILD gcc-13.1.0-r1.ebuild 1664 BLAKE2B bdcba5d20f3748daf50f8f1d2ae85c22e7b8b472d2e99124758ede62ffad19d5a5551b3176006b23f3316f8027d43a93ef5ad3fb5a761c81419588cb614d26a0 SHA512 dc0f06cce63ab80e7990e2302a21a43e8423f4a23eb9cda8503529d1adf7207022106c3a8ac21af0fd5c9a0b31b4d73a64e5e4b12b2db5f516ba3f3dd1bf61a5
diff --git a/sys-devel/gcc/files/gcc-12.3-ccache-ICE.patch b/sys-devel/gcc/files/gcc-12.3-ccache-ICE.patch
new file mode 100644
index 000000000000..9a170f5db77e
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-12.3-ccache-ICE.patch
@@ -0,0 +1,67 @@
+https://bugs.gentoo.org/906310
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109850
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109241
+
+https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=396a4e76afec30d2461638f569cae18955eb4ad2
+
+From 396a4e76afec30d2461638f569cae18955eb4ad2 Mon Sep 17 00:00:00 2001
+From: Jason Merrill <jason@redhat.com>
+Date: Wed, 22 Mar 2023 16:11:47 -0400
+Subject: [PATCH] c++: local class in nested generic lambda [PR109241]
+
+In this testcase, the tree walk to look for bare parameter packs was
+confused by finding a type with no TREE_BINFO. But it should be fine that
+it's unset; we already checked for unexpanded packs at parse time.
+
+I also tried doing the partial instantiation of the local class, which is
+probably the long-term direction we want to go, but for stage 4 let's go
+with this safer change.
+
+ PR c++/109241
+
+gcc/cp/ChangeLog:
+
+ * pt.cc (find_parameter_packs_r): Handle null TREE_BINFO.
+
+gcc/testsuite/ChangeLog:
+
+ * g++.dg/cpp1y/lambda-generic-local-class2.C: New test.
+--- a/gcc/cp/pt.cc
++++ b/gcc/cp/pt.cc
+@@ -4106,10 +4106,14 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data)
+ case TAG_DEFN:
+ t = TREE_TYPE (t);
+ if (CLASS_TYPE_P (t))
+- /* Local class, need to look through the whole definition. */
+- for (tree bb : BINFO_BASE_BINFOS (TYPE_BINFO (t)))
+- cp_walk_tree (&BINFO_TYPE (bb), &find_parameter_packs_r,
+- ppd, ppd->visited);
++ {
++ /* Local class, need to look through the whole definition.
++ TYPE_BINFO might be unset for a partial instantiation. */
++ if (TYPE_BINFO (t))
++ for (tree bb : BINFO_BASE_BINFOS (TYPE_BINFO (t)))
++ cp_walk_tree (&BINFO_TYPE (bb), &find_parameter_packs_r,
++ ppd, ppd->visited);
++ }
+ else
+ /* Enum, look at the values. */
+ for (tree l = TYPE_VALUES (t); l; l = TREE_CHAIN (l))
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-local-class2.C
+@@ -0,0 +1,13 @@
++// PR c++/109241
++// { dg-do compile { target c++14 } }
++// { dg-options "" } no pedantic
++
++void g() {
++ [](auto) {
++ [](auto) {
++ ({
++ struct A {};
++ });
++ };
++ }(1);
++}
+--
+2.31.1
diff --git a/sys-devel/gcc/gcc-12.3.1_p20230512-r1.ebuild b/sys-devel/gcc/gcc-12.3.1_p20230512-r1.ebuild
new file mode 100644
index 000000000000..922e86050a50
--- /dev/null
+++ b/sys-devel/gcc/gcc-12.3.1_p20230512-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_VER="2"
+PATCH_GCC_VER="12.3.0"
+MUSL_VER="1"
+MUSL_GCC_VER="12.3.0"
+
+if [[ $(ver_cut 3) == 9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=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}.$(($(ver_cut 3) - 9998))
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ # Sometimes the RCs are e.g. 12.3 and not 12.3.0...
+ #MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 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=releases/gcc-$(ver_cut 1)
+
+# 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() {
+ toolchain_src_prepare
+
+ eapply "${FILESDIR}"/${PN}-12.3-ccache-ICE.patch
+ eapply_user
+}