Boost logo

Boost Users :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-03-31 10:33:21


Brad Cox wrote:
> I'm trying to cross-compile boost for the Embedded Planet PowerPC 82xx
> target platform and have a few questions. This is the first time I've
> used jam so I'm a bit disoriented. Can somebody help?

Yes... There's even a whole list dedicated to this, Jamboost, see...

http://boost.org/more/mailing_lists.htm#projects

[...]
> Question is, how do I compile boost for this platform? I've copied
> tools/build/v1/gcc-tools.jam to tools/build/v1/ppc_82xx-tools.jam and
> changed the GCC/GXX settings in that file to ppc_82xx-gcc and
> ppc_82xx-g++ respectively, which is all that should be needed insofar as
> their compiler is concerned.

You should have been able to do that without changing the gcc-tools.jam,
with -sGCC=ppc_82xx-gcc for example. But it looks like you're going to
need to make more changes so it's actually good that you made a new
toolset file.

> Here's what I'm getting: jam needs to be told the target architecture
> somehow. Question is, how do I do this?
>
> /usr/local/tena-tools/i686-pc-linux-gnu/bin/bjam
> --prefix="/usr/local/boost/1.31.0/rh9-gcc322-ppc82xx-d"
> --builddir="/usr/local/boost/1.31.0/rh9-gcc322-ppc82xx-d/build"
> -sTOOLS="ppc_82xx-gcc" -sBUILD="debug <runtime-link>dynamic
> <threading>multi" -sGXX="ppc_82xx-gcc" -sGCC="ppc_82xx-gcc"
> install
[...strange multi-copy of the same command]
> ...found 8259 targets...
> ...updating 226 targets...
[...]
> /usr/bin/objcopy: Warning: Output file cannot represent architecture
> UNKNOWN!

That looks like the only problem you have. The use of the
binutils/objcopy program is an optimization when building release
versions. It reduces the symbols in the the object file to get around an
inefficient N^2 algorithm in the linker. You have two choices..

1. Remove the use of objcopy by removing the line this line in the toolset:

flags gcc .OBJCOPY : [ GLOB $(GCC_BIN_DIRECTORY) $(PATH) : objcopy ] ;

2. Try and make the use of objcopy work, assuming you have one for the
cross compile target. If there is one it would be part of the binutils
build for the target so it's likely to be wherever the cross-linker is.
If you find it, just add that directory to your PATH when building. For
example (must be before the rest of PATH so it finds it first):

bjam ... -sPATH=/some/dir/with/objcopy/bin:${PATH} ...

Or changing the same above line to hardwire the location of the objcopy
you want to use.

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

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net