From 6fdf3148afd03e4fa7a535452c532819df7567ef Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 14 Apr 2006 20:12:11 +0000 Subject: [PATCH] [merge from head] Fix RC tool to fallback to the null rc type when a real one can't be found. [SVN r33700] --- src/tools/gcc.jam | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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) ; }