diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index 824e79443..41a0e1d0f 100644 --- a/src/tools/gcc.jam +++ b/src/tools/gcc.jam @@ -105,7 +105,7 @@ rule init ( version ? : command * : options * ) #~ - The archive builder. local archiver = [ common.get-invocation-command gcc - : ar : [ feature.get-values : $(options) ] : $(bin) : PATH ] ; + : ar : [ feature.get-values : $(options) ] : $(bin) : search-path ] ; flags gcc.archive .AR $(condition) : $(archiver[1]) ; if $(.debug-configuration) { @@ -115,10 +115,21 @@ rule init ( version ? : command * : options * ) #~ - The resource compiler. local rc = [ common.get-invocation-command gcc - : windres : [ feature.get-values : $(options) ] : $(bin) : PATH ] ; + : windres : [ feature.get-values : $(options) ] : $(bin) : search-path ] ; local rc-type = [ feature.get-values : $(options) ] ; rc-type ?= windres ; + if ! $(rc) + { + #~ If we can't find an RC compiler we fallback to a null RC compiler + #~ that creates empty object files. This allows the same Jamfiles + #~ to work across the board. The null RC uses the assembler to create + #~ the empty objects, so configure that. + local rc = + [ common.get-invocation-command gcc + : as : : $(bin) : search-path ] ; + rc-type = null ; + } rc.configure $(rc) : $(condition) : $(rc-type) ; }