Diff gcc-8.5.0-r1 with a gcc-9.5.0

/usr/portage/sys-devel/gcc/gcc-9.5.0.ebuild 2023-10-09 14:52:35.484368501 +0300
1 1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI="7"
4
EAPI=8
5 5

  
6
TOOLCHAIN_PATCH_SUFFIX="xz"
7 6
TOOLCHAIN_PATCH_DEV="sam"
8
PATCH_VER="4"
7
PATCH_GCC_VER="9.5.0"
8
PATCH_VER="2"
9

  
10
if [[ ${PV} == *.9999 ]] ; then
11
	MY_PV_2=$(ver_cut 2)
12
	MY_PV_3=1
13
	if [[ ${MY_PV_2} == 0 ]] ; then
14
		MY_PV_2=0
15
		MY_PV_3=0
16
	else
17
		MY_PV_2=$((${MY_PV_2} - 1))
18
	fi
19

  
20
	# e.g. 12.2.9999 -> 12.1.1
21
	TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
22
elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
23
	# Cheesy hack for RCs
24
	MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
25
	MY_P=${PN}-${MY_PV}
26
	GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
27
	TOOLCHAIN_SET_S=no
28
	S="${WORKDIR}"/${MY_P}
29
fi
9 30

  
10 31
inherit toolchain
11 32

  
12
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
33
if tc_is_live ; then
34
	# Needs to be after inherit (for now?), bug #830908
35
	EGIT_BRANCH=releases/gcc-$(ver_cut 1)
36
elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
37
	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
38
fi
13 39

  
14 40
RDEPEND=""
15
DEPEND="${RDEPEND}
16
	elibc_glibc? ( >=sys-libs/glibc-2.13 )
17
	>=${CATEGORY}/binutils-2.20"
41
BDEPEND="${CATEGORY}/binutils"
18 42

  
19
if [[ ${CATEGORY} != cross-* ]] ; then
20
	PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )"
21
fi
43
src_prepare() {
44
	local p upstreamed_patches=(
45
		# add them here
46
	)
47
	for p in "${upstreamed_patches[@]}"; do
48
		rm -v "${WORKDIR}/patch/${p}" || die
49
	done
50

  
51
	toolchain_src_prepare
52
}
Thank you!