From 9df3a65a2842090641ca0dedd36bc016f790fbeb Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 6 Oct 2018 06:34:28 +0300 Subject: [PATCH] Update GCC and Clang mangling to reflect their new versioning scheme --- src/tools/common.jam | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/tools/common.jam b/src/tools/common.jam index 3cc9dd9c2..ce78b28d2 100644 --- a/src/tools/common.jam +++ b/src/tools/common.jam @@ -19,6 +19,7 @@ import path ; import sequence ; import toolset ; import virtual-target ; +import numbers ; if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] { @@ -966,6 +967,19 @@ local rule toolset-tag ( name : type ? : property-set ) version = 7 ; } } + + # From GCC 5, versioning changes and minor becomes patch + if $(tag) = gcc && [ numbers.less 4 $(version[1]) ] + { + version = $(version[1]) ; + } + + # Ditto, from Clang 4 + if $(tag) = clang && [ numbers.less 3 $(version[1]) ] + { + version = $(version[1]) ; + } + # On intel, version is not added, because it does not matter and it is the # version of vc used as backend that matters. Ideally, we should encode the # backend version but that would break compatibility with V1.