summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-02-09 11:43:12 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2020-02-09 11:46:31 +0000
commit3293bae77263dd73adf3cf651863033ca3698055 (patch)
tree1a9f59ff93c3d7bea981838aa46b271085ed27ef /eclass
parentdev-lang/erlang: bump up to 22.2.6 (diff)
downloadgentoo-3293bae77263dd73adf3cf651863033ca3698055.tar.gz
gentoo-3293bae77263dd73adf3cf651863033ca3698055.tar.bz2
gentoo-3293bae77263dd73adf3cf651863033ca3698055.zip
toolchain.eclass: don't allow overriding GCC_CONFIG_VER
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>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass17
1 files changed, 11 insertions, 6 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 03e335dac5c5..ef23d8b0b67e 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -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