Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 17 Jul 2021 10:25:32
Message-Id: 1626517525.c57ea1ef814ac2c3007f60edf63a4d834525040b.slyfox@gentoo
1 commit: c57ea1ef814ac2c3007f60edf63a4d834525040b
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 17 09:16:52 2021 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 17 10:25:25 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c57ea1ef
7
8 toolchain.eclass: add an assert for minimum supported gcc
9
10 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
11
12 eclass/toolchain.eclass | 5 +++++
13 1 file changed, 5 insertions(+)
14
15 diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
16 index f10309c3f73..fca996f8244 100644
17 --- a/eclass/toolchain.eclass
18 +++ b/eclass/toolchain.eclass
19 @@ -97,6 +97,11 @@ elif [[ ${GCC_PV} == *_rc* ]] ; then
20 SNAPSHOT=${GCC_PV%_rc*}-RC-${GCC_PV##*_rc}
21 fi
22
23 +# Require minimum gcc version to simplify assumptions.
24 +# Normally we would require gcc-6+ (based on sys-devel/gcc)
25 +# but we still have sys-devel/gcc-apple-4.2.1_p5666.
26 +tc_version_is_at_least 4.2.1 || die "${ECLASS}: ${GCC_RELEASE_VER} is too old."
27 +
28 PREFIX=${TOOLCHAIN_PREFIX:-${EPREFIX}/usr}
29
30 LIBPATH=${TOOLCHAIN_LIBPATH:-${PREFIX}/lib/gcc/${CTARGET}/${GCC_CONFIG_VER}}