Boost logo

Boost-Build :

From: Ian Fasel (ianfasel_at_[hidden])
Date: 2006-04-08 06:14:40


Hi all,

Question 1) What is the best way to build (my own) 64-bit libraries
on darwin using bbv2? I currently do it by hacking darwin.jam, user-
config.jam and my project Jamfiles, but it's not elegant. I'd like
to do this in a platform independent way so that I can build with or
without 64 bit support depending on the platform (arch -ppc, -ppc64,
eventually -x86). If this can't be fully automatic, at least in a
way that the user can specify in command-line arguments when building.

Question 2) I need to build the boost libraries in three ways on
darwin: gcc-3.3, gcc-4.0, and gcc-4.0 -arch ppc64. (possibly this
could be reduced to two ways if fat binaries are used). I have a
single bbv2 project that needs to build some targets with gcc-3.3,
some targets with gcc-4.0, and some targets with gcc-4.0 -arch
ppc64. Any of these targets will want to use boost libraries, so
they need to know which library to link to. How?

What is confusing to me is the fact that <toolset> is normally what
specifies gcc-3.3 or 4.0 or 64 bits, but actually I want these to be
more like features that get tracked through the build process, like
dependencies.

For instance:
1) I have sources for my library foo in a subdirectory of the project.
2) libA depends on libfoo. libA needs to be built with gcc-3.3 (for
unavoidable reasons due to a 3rd party program). libA needs to know
which version of the boost libs to link to, as well as link to a
gcc-3.3 build of libfoo.
3) libB needs 64-bit support, so needs to be built with gcc-4.0. It
also will link to libfoo (but this time, a gcc-4.0 -arch ppc64 build
of it). It also will use boost.
4) libB and libfoo also need to be able to be built without 64-bit
support if the CPU doesn't support it (using darwin, I could be on a
32-bit or 64-bit PowerPC or a 32-bit Intel), but still use gcc-4.0.
Moreover, some other gcc-4.0 targets in the project never need 64-bit
support, so in short I don't want to force 64-bits and may want a
mixed build with some 64-bit some 32-bit targets.

Ideally libfoo would automatically know to get built twice, perhaps
with different filename_endings, based on the requirements of its
dependent targets. Hopefully dependencies on boost libraries could be
tracked the same way.

I have actually gotten most of this to work on my own with some
rather disgusting hacking. But I'd appreciate any advice on doing
this the "right" way, example Jamfiles if anyone else is doing things
like this, or any other help! Are there magical undocumented
features I might be able to specify somewhere? Do I perhaps want
something like an umbrella "darwin" toolset, that switches between
gcc-3.3 and 4.0 as needed within the project?

Many thanks!
-Ian Fasel


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