Cross Compiling Boost C++ Libraries for ARM
Boost provides free peer-reviewed portable C++ source libraries. Ten Boost libraries are already included in the C++ Standards Committee’s Library Technical Report and will be in the new C++11 Standard.
The Boost C++ libraries are already included in popular Linux and Unix distributions such as Fedora, Debian, Ubuntu and NetBSD and are used by projects such as Python, Xibo, Civilization IV, etc..
Here are the steps to cross-compile Boost C++ libraries for arm using arm-linux-guneabi-g++:
- Download the source code:
- Extract the source code:
123mv download boost.tar.bz2tar xjvf boost.tar.bz2cd boost_1_47_0/
- Bootstrap the code:
- Modify the configuration file (project-build.jam) to use the ARM toolchain by replacing the line with “using gcc” by:
1using gcc : arm : arm-linux-gnueabi-g++ ;
- Install the python development package:
1sudo apt-get install python-dev
- Build and install the boost libraries:
1./bjam install toolset=gcc-arm --prefix=~/edev/beagleboard/libs --disable-long-double -sNO_ZLIB=1 -sNO_BZIP2=1
This was tested in Ubuntu 11.04 (natty) and 10.04 LTS with linaro g++ toolchain.