Boost logo

Boost Users :

From: Hughes, James (jhughes_at_[hidden])
Date: 2007-10-19 04:54:34


> -----Original Message-----
> From: boost-users-bounces_at_[hidden]
> [mailto:boost-users-bounces_at_[hidden]] On Behalf Of
> Vladimir Prus
> Sent: 19 October 2007 09:29
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] How well does Boost support
> cross-compilation?
>
> n.torrey.pines_at_[hidden] wrote:
>
> > I'm dreaming of compiling MinGW, OS X (Intel and PowerPC) and Linux
> > x86 versions of my program in one go, perhaps on Linux. The program
> > uses little other than several Boost libraries. Is this a
> possible and
> > reliable usage scenario?
> >
> > This doesn't seem like a particularly original idea, so I'm sure
> > others explored it. Are there any how-to's? I couldn't find any.
>
> Several folks did Linux->{various embedded systems} compile,
> and it worked. That's good news. The bad news is that
> Linix->MinGW compile won't 100% work out of box.
>
> You can do cross-compiling by setting up a user-config.jam,
> where you configure gcc toolset, explicitly specifying a
> command, which would be like i686-mingw32-g++, or some such.
> I think the compilation will even work. The problem is that
> you'll end up with libraries named .a and .so and executables
> named without any suffix. This is because while Boost.Build
> has <target-os> feature, the code that determines file
> extension looks at host os, not target-os. It's not hard to
> fix, but it need somebody to do that. Patches welcome :-)
>
> - Volodya
>

As an example, here is the command line I use to compile boost for an
ARM processor.

bjam "-sGCC_ROOT_DIRECTORY=<location of cross compiler>"
"-sGCC=iwmmxt_le-gcc" "-sGXX=iwmmxt_le-g++" stage

Where the compilers and associated bits and pieces are preceeded with
-wmmxt_le-<whatever>

Seems to work OK.

James

This message (including any attachments) contains confidential
and/or proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on
the contents of this information is strictly prohibited and may
constitute a violation of law. If you are not the intended
recipient, please notify the sender immediately by responding to
this e-mail, and delete the message from your system. If you
have any questions about this e-mail please notify the sender
immediately.


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