Boost C++ Libraries

PrevUpHomeNext

Cross-compilation

Boost.Build supports cross compilation with the gcc and msvc toolsets.

When using gcc, you first need to specify your cross compiler in user-config.jam (see the section called “Configuration”), for example:

using gcc : arm : arm-none-linux-gnueabi-g++ ;

After that, if the host and target os are the same, for example Linux, you can just request that this compiler version to be used:

b2 toolset=gcc-arm

If you want to target different operating system from the host, you need to additionally specify the value for the target-os feature, for example:

# On windows box
b2 toolset=gcc-arm target-os=linux
# On Linux box
b2 toolset=gcc-mingw target-os=windows

For the complete list of allowed opeating system names, please see the documentation for target-os feature.

When using the msvc compiler, it's only possible to cross-compiler to a 64-bit system on a 32-bit host. Please see the section called “64-bit support” for details.


PrevUpHomeNext