summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-04-19 16:08:44 +0100
committerSam James <sam@gentoo.org>2022-04-19 16:08:44 +0100
commita69e37009f3d4382cf4c7afeae473dc997c2189d (patch)
tree40c5769afd5ba0f1b5f1cf1ed12be92e5f0eb872 /eclass/toolchain.eclass
parentdev-libs/libical: drop berkdb support (diff)
downloadgentoo-a69e37009f3d4382cf4c7afeae473dc997c2189d.tar.gz
gentoo-a69e37009f3d4382cf4c7afeae473dc997c2189d.tar.bz2
gentoo-a69e37009f3d4382cf4c7afeae473dc997c2189d.zip
toolchain.eclass: support GCC pre-releases for new branches
Needed for GCC 12. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r--eclass/toolchain.eclass9
1 files 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