Boost logo

Boost-Build :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2006-04-14 16:23:42


Juergen Hunold wrote:
> On Friday 14 April 2006 15:38, Rene Rivera wrote:
> So it all boils down to toolset configuration. Unfortunately, I never
> got the time to setup cross compilation of my programs. I'm sure that
> would have prevented this hack ;-))

Probably... It might be worth it to try it sometime. Sometime in my
future I'm planning to make use of LLVM <http://llvm.org/>. And if
you're on Linux it should be easy to set up.

>> The real fix is to use the dummy rc building if an rc command is not
>> found. I guess I should have seen that was what the original code was
>> intending on doing. Now that I know I'll go fix it.
>
> Thanks !
>
> A clean fix that does not break cross compiling is much better.

:-) This is the change I did...

===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/gcc.jam,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- gcc.jam 7 Apr 2006 00:48:49 -0000 1.70
+++ gcc.jam 14 Apr 2006 20:07:35 -0000 1.71
@@ -105,7 +105,7 @@
      #~ - The archive builder.
      local archiver =
          [ common.get-invocation-command gcc
- : ar : [ feature.get-values <archiver> : $(options) ] :
$(bin) : PATH ] ;
+ : ar : [ feature.get-values <archiver> : $(options) ] :
$(bin) : search-path ] ;
      flags gcc.archive .AR $(condition) : $(archiver[1]) ;
      if $(.debug-configuration)
      {
@@ -115,10 +115,21 @@
      #~ - The resource compiler.
      local rc =
          [ common.get-invocation-command gcc
- : windres : [ feature.get-values <rc> : $(options) ] :
$(bin) : PATH ] ;
+ : windres : [ feature.get-values <rc> : $(options) ] :
$(bin) : search-path ] ;
      local rc-type =
          [ feature.get-values <rc-type> : $(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>$(rc-type) ;
  }

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

Boost-Build 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