From ac1109b9ee8f0740948b76c0ab37cd2ecd1e2365 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 3 May 2007 06:05:21 +0000 Subject: [PATCH] Change to using the stable "-dumpversion" and "-dumpmachine" options of GCC to autoconfigure the toolset. [SVN r37573] --- src/tools/gcc.jam | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index efe907827..800d3f2b2 100644 --- a/src/tools/gcc.jam +++ b/src/tools/gcc.jam @@ -81,10 +81,11 @@ rule init ( version ? : command * : options * ) # The 'command' variable can have multiple elements. When calling # the SHELL builtin we need a single string. local command-string = $(command:J=" ") ; - local command-info = [ MATCH "^[^ ]+[ ]+[^ ]+[ ]+([^ ]+)[^(]*[(]?([^)]*)" - : [ SHELL "$(command-string) --version" ] ] ; - version ?= $(command-info[1]) ; - switch $(command-info[2]:L) + local machine = [ MATCH "^([^ ]+)" + : [ SHELL "$(command-string) -dumpmachine" ] ] ; + version ?= [ MATCH "^([0-9.]+)" + : [ SHELL "$(command-string) -dumpversion" ] ] ; + switch $(machine:L) { case *mingw* : flavor ?= mingw ; }