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.