commit: a69e37009f3d4382cf4c7afeae473dc997c2189d
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 19 15:08:44 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 19 15:08:44 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a69e3700
toolchain.eclass: support GCC pre-releases for new branches
Needed for GCC 12.
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain.eclass | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 8788e72efebb..3bd4b84f494a 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -83,15 +83,18 @@ GCCMICRO=$(ver_cut 3 ${GCC_PV})
# Ideally this variable should allow for custom gentoo versioning
# of binary and gcc-config names not directly tied to upstream
-# versioning. In practive it's hard to untangle from gcc/BASE-VER
+# versioning. In practice it's hard to untangle from gcc/BASE-VER
# (GCC_RELEASE_VER) value.
GCC_CONFIG_VER=${GCC_RELEASE_VER}
# Pre-release support. Versioning schema:
# 1.0.0_pre9999: live ebuild
-# 1.2.3_pYYYYMMDD: weekly snapshots
+# 1.2.3_pYYYYMMDD (or 1.2.3_preYYYYMMDD for unreleased major versions): weekly
snapshots
# 1.2.3_rcYYYYMMDD: release candidates
-if [[ ${GCC_PV} == *_p* ]] ; then
+if [[ ${GCC_PV} == *_pre* ]] ; then
+ # weekly snapshots
+ SNAPSHOT=${GCCMAJOR}-${GCC_PV##*_pre}
+elif [[ ${GCC_PV} == *_p* ]] ; then
# weekly snapshots
SNAPSHOT=${GCCMAJOR}-${GCC_PV##*_p}
elif [[ ${GCC_PV} == *_rc* ]] ; then