commit:     c57ea1ef814ac2c3007f60edf63a4d834525040b
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 17 09:16:52 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Jul 17 10:25:25 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c57ea1ef

toolchain.eclass: add an assert for minimum supported gcc

Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 eclass/toolchain.eclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index f10309c3f73..fca996f8244 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -97,6 +97,11 @@ elif [[ ${GCC_PV} == *_rc* ]] ; then
        SNAPSHOT=${GCC_PV%_rc*}-RC-${GCC_PV##*_rc}
 fi
 
+# Require minimum gcc version to simplify assumptions.
+# Normally we would require gcc-6+ (based on sys-devel/gcc)
+# but we still have sys-devel/gcc-apple-4.2.1_p5666.
+tc_version_is_at_least 4.2.1 || die "${ECLASS}: ${GCC_RELEASE_VER} is too old."
+
 PREFIX=${TOOLCHAIN_PREFIX:-${EPREFIX}/usr}
 
 LIBPATH=${TOOLCHAIN_LIBPATH:-${PREFIX}/lib/gcc/${CTARGET}/${GCC_CONFIG_VER}}

Reply via email to