Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/gcc/
Date: Sun, 06 Nov 2022 09:30:50
Message-Id: 1667727015.c768d39a520e224115b7de254a9d0340fd6bfff5.sam@gentoo
1 commit: c768d39a520e224115b7de254a9d0340fd6bfff5
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 6 09:30:09 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 6 09:30:15 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c768d39a
7
8 sys-devel/gcc: add 12.2.1_p20221105
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sys-devel/gcc/gcc-12.2.1_p20221105.ebuild | 52 +++++++++++++++++++++++++++++++
13 1 file changed, 52 insertions(+)
14
15 diff --git a/sys-devel/gcc/gcc-12.2.1_p20221105.ebuild b/sys-devel/gcc/gcc-12.2.1_p20221105.ebuild
16 new file mode 100644
17 index 000000000000..97d104a8472d
18 --- /dev/null
19 +++ b/sys-devel/gcc/gcc-12.2.1_p20221105.ebuild
20 @@ -0,0 +1,52 @@
21 +# Copyright 1999-2022 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=8
25 +
26 +TOOLCHAIN_PATCH_DEV="sam"
27 +PATCH_VER="1"
28 +PATCH_GCC_VER="12.2.0"
29 +MUSL_VER="1"
30 +MUSL_GCC_VER="12.2.0"
31 +
32 +if [[ $(ver_cut 3) == 9999 ]] ; then
33 + MY_PV_2=$(ver_cut 2)
34 + if [[ ${MY_PV_2} == 0 ]] ; then
35 + MY_PV_2=0
36 + else
37 + MY_PV_2=$(($(ver_cut 2) - 1))
38 + fi
39 +
40 + # e.g. 12.2.9999 -> 12.1.1
41 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
42 +elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
43 + # Cheesy hack for RCs
44 + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
45 + MY_P=${PN}-${MY_PV}
46 + GCC_TARBALL_SRC_URI="https://gcc.gnu.org/pub/gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
47 + TOOLCHAIN_SET_S=no
48 + S="${WORKDIR}"/${MY_P}
49 +fi
50 +
51 +inherit toolchain
52 +
53 +# Needs to be after inherit (for now?), bug #830908
54 +EGIT_BRANCH=releases/gcc-$(ver_cut 1)
55 +
56 +# Don't keyword live ebuilds
57 +#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
58 +# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
59 +#fi
60 +
61 +# Technically only if USE=hardened *too* right now, but no point in complicating it further.
62 +# If GCC is enabling CET by default, we need glibc to be built with support for it.
63 +# bug #830454
64 +RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
65 +DEPEND="${RDEPEND}"
66 +BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
67 +
68 +src_prepare() {
69 + toolchain_src_prepare
70 +
71 + eapply_user
72 +}