Boost logo

Boost-Build :

From: Mat Marcus (mat-lists_at_[hidden])
Date: 2007-12-01 14:11:03


On Dec 1, 2007 10:22 AM, Vladimir Prus <ghost_at_[hidden]> wrote:
> On Wednesday 21 November 2007 23:22:39 Mat Marcus wrote:
> > I've made a number of changes to my universal-binary supporting
> > darwin.jam patch (shipping with the Adobe Source Library) in order to
> > address the concerns raised by Rene and others at
> > http://svn.boost.org/trac/boost/ticket/989 :
> >
> > My current version supports invocations like:
> >
> > bjam architecture={combined,x86,power} link={shared,static}
> > address-mode={64,32}
> >
> > That is, universal builds are now supported, along with 64 bit builds.
> > I'd like to ask for the help from a few volunteers who'd be willing to
> > test it out, before I submit my patch for consideration here. Anyone
> > interested in helping me test it?
> >
> > One of the issues that remains pertains to folder naming. On the mac,
> > if a build doesn't specify an -arch parameter, the architecture (and
> > perhaps the address model) of the host machine is used. I'm not really
> > comfortable with the same folder path meaning different things on
> > different machines. So, I'd like to do something like the following in
> > darwin.jam (in invented pseudo code)
>
> Don't we have similar issue, in general? If you don't specify architecture,
> explicitly, you get the default one.

There was a second issue that motivated me to address this issue.
Currently, the opensource Intel Thread Building Blocks Library is
supported on darwin on architecture=x86 for address-model={32 or 64}.
For architecture={combined or power} the lib only supports
address-model=64. I was trying to write a rule in a Jamfile.v2 for a
library that conditionally used the the intel tbb library, by setting
it's <atomics>tbb feature, according to the address-model/architecture
combination. Something like:

rule use-intel-atomics ( properties * )
{
  local result ;
  if ( ! ( <toolset>darwin in $(properties) ) ) ||
   ( ( <address-model>64 in $(properties) ) ) ||
   ( ( <architecture>x86 in $(properties) ) ) {
         if ( <toolset>gcc in $(properties) && ( os<NT> || os<cygwin> in
properties ) ) {
     } else {
          result += <atomics>tbb ;
     }
  }
  return $(result) ;
}

But this conditional seems to fail when the address-model/architecture
features are not explicitly set. I suppose that I could add logic to
run /usr/bin/arch to find out the meaning of the unset features, but
it seemed like the darwin toolset was a better home for such logic. Of
course my bbv2 are not that strong, so I may be missing a simpler
idiom here.

 - Mat


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