|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65640 - trunk/tools/build/v2/tools
From: ghost_at_[hidden]
Date: 2010-09-27 12:39:40
Author: vladimir_prus
Date: 2010-09-27 12:39:37 EDT (Mon, 27 Sep 2010)
New Revision: 65640
URL: http://svn.boost.org/trac/boost/changeset/65640
Log:
Relax the check between user-specified version and the one from 'g++'.
Fixes #4667.
Text files modified:
trunk/tools/build/v2/tools/gcc.jam | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
Modified: trunk/tools/build/v2/tools/gcc.jam
==============================================================================
--- trunk/tools/build/v2/tools/gcc.jam (original)
+++ trunk/tools/build/v2/tools/gcc.jam 2010-09-27 12:39:37 EDT (Mon, 27 Sep 2010)
@@ -91,13 +91,24 @@
{
local tool-command-string = $(tool-command:J=" ") ;
local tool-version = [ MATCH "^([0-9.]+)" : [ SHELL "$(tool-command-string) -dumpversion" ] ] ;
- ECHO "XXX" $(tool-version) ;
if $(tool-version) != $(version)
{
- errors.error "toolset gcc initialization:" :
- "version '$(version)' requested but 'g++-$(version)' not found and version '$(tool-version)' of default '$(tool-command)' does not match" :
- "initialized from" [ errors.nearest-user-location ] ;
- tool-command = ;
+ # Permit a match betwen two-digit version specified by the user
+ # (e.g. 4.4) and 3-digit version reported by gcc.
+ # Since only two digits are present in binary name anyway,
+ # insisting that user specify 3-digit version when
+ # configuring Boost.Build while it's not required on
+ # command like would be strange.
+ local stripped = [ MATCH "^([0-9]+\.[0-9]+).*" : $(tool-version) ] ;
+ if $(stripped) != $(version)
+ {
+ errors.error "toolset gcc initialization:" :
+ "version '$(version)' requested but 'g++-$(version)' not found and version '$(tool-version)' of default '$(tool-command)' does not match" :
+ "initialized from" [ errors.nearest-user-location ] ;
+ tool-command = ;
+ }
+ # Use full 3-digit version to be compatible with the 'using gcc ;' case
+ version = $(tool-version) ;
}
}
else
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk