Index: gcc.jam =================================================================== --- gcc.jam (revision 44580) +++ gcc.jam (working copy) @@ -103,14 +103,13 @@ # The 'command' variable can have multiple elements. When calling # the SHELL builtin we need a single string. local command-string = $(command:J=" ") ; - local machine = [ MATCH "^([^ ]+)" + local nl = " +" ; + local machine = [ MATCH "^([^ $(nl)]+)" : [ SHELL "$(command-string) -dumpmachine" ] ] ; version ?= [ MATCH "^([0-9.]+)" : [ SHELL "$(command-string) -dumpversion" ] ] ; - switch $(machine:L) - { - case *mingw* : flavor ?= mingw ; - } + flavor ?= [ regex.replace $(machine) "-" "_" ] ; } local condition ; @@ -120,12 +119,12 @@ : version $(version) : flavor $(flavor) ] ; + toolset.add-requirements + $(version):$(flavor) ; } else { - condition = [ common.check-init-parameters gcc - : version $(version) - ] ; + errors.user-error "Could not detect gcc variant." ; } common.handle-options gcc : $(condition) : $(command) : $(options) ;