toolchain.eclass: don't allow overriding GCC_CONFIG_VER
authorSergei Trofimovich <slyfox@gentoo.org>
Sun, 9 Feb 2020 11:43:12 +0000 (11:43 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Sun, 9 Feb 2020 11:46:31 +0000 (11:46 +0000)
dev-lang/gnat-gpl migrated from GCC_CONFIG_VER to TOOLCHAIN_GCC_PV.

Bug: https://bugs.gentoo.org/706588
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
eclass/toolchain.eclass

index 03e335dac5c53b8d02c7c2a85b30b1f225242211..ef23d8b0b67eedac505d6a98e497a4fca67129f9 100644 (file)
@@ -67,18 +67,23 @@ tc_version_is_between() {
 GCC_PV=${TOOLCHAIN_GCC_PV:-${PV}}
 GCC_PVR=${GCC_PV}
 [[ ${PR} != "r0" ]] && GCC_PVR=${GCC_PVR}-${PR}
+
+# GCC_RELEASE_VER must always match 'gcc/BASE-VER' value.
+# It's an internal representation of gcc version used for:
+# - versioned paths on disk
+# - 'gcc -dumpversion' output. Must always match <digit>.<digit>.<digit>.
 GCC_RELEASE_VER=$(ver_cut 1-3 ${GCC_PV})
+
 GCC_BRANCH_VER=$(ver_cut 1-2 ${GCC_PV})
 GCCMAJOR=$(ver_cut 1 ${GCC_PV})
 GCCMINOR=$(ver_cut 2 ${GCC_PV})
 GCCMICRO=$(ver_cut 3 ${GCC_PV})
 
-# gcc hardcodes it's internal version into gcc/BASE-VER
-# and assumes various directories and tools to have the
-# same name.
-# TODO: once ada ebuilds are fixed turn it to
-#     GCC_CONFIG_VER=${GCC_RELEASE_VER}
-GCC_CONFIG_VER=${GCC_CONFIG_VER:-${GCC_RELEASE_VER}}
+# 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
+# (GCC_RELEASE_VER) value.
+GCC_CONFIG_VER=${GCC_RELEASE_VER}
 
 # Pre-release support. Versioning schema:
 # 1.0.0_pre9999: live ebuild