Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51326 - trunk/tools/build/v2/tools
From: ghost_at_[hidden]
Date: 2009-02-19 04:17:21


Author: vladimir_prus
Date: 2009-02-19 04:17:20 EST (Thu, 19 Feb 2009)
New Revision: 51326
URL: http://svn.boost.org/trac/boost/changeset/51326

Log:
When deciding what options compiler accepts, use the version number the
compiler has reported, as opposed to the version number specified by the
user in user-config.jam.

Text files modified:
   trunk/tools/build/v2/tools/darwin.jam | 10 +++++++---
   1 files changed, 7 insertions(+), 3 deletions(-)

Modified: trunk/tools/build/v2/tools/darwin.jam
==============================================================================
--- trunk/tools/build/v2/tools/darwin.jam (original)
+++ trunk/tools/build/v2/tools/darwin.jam 2009-02-19 04:17:20 EST (Thu, 19 Feb 2009)
@@ -91,6 +91,9 @@
     # - The configured compile driver command.
     local command = [ common.get-invocation-command darwin : g++ : $(command) ] ;
     
+ # The version as reported by the compiler
+ local real-version ;
+
     # - Autodetect the root and bin dir if not given.
     if $(command)
     {
@@ -113,8 +116,9 @@
         # - The 'command' variable can have multiple elements. When calling
         # the SHELL builtin we need a single string.
         local command-string = $(command:J=" ") ;
- version ?= [ MATCH "^([0-9.]+)"
+ real-version = [ MATCH "^([0-9.]+)"
             : [ SHELL "$(command-string) -dumpversion" ] ] ;
+ version ?= $(real-version) ;
     }
     
     # - Define the condition for this toolset instance.
@@ -125,12 +129,12 @@
     common.handle-options darwin : $(condition) : $(command) : $(options) ;
     
     # - GCC 4.0 and higher in Darwin does not have -fcoalesce-templates.
- if $(version) < "4.0.0"
+ if $(real-version) < "4.0.0"
     {
         flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-templates ;
     }
     # - GCC 4.2 and higher in Darwin does not have -Wno-long-double.
- if $(version) < "4.2.0"
+ if $(real-version) < "4.2.0"
     {
         flags darwin.compile OPTIONS $(condition) : -Wno-long-double ;
     }


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