I'm trying to setup Boost 1.42 in our system. I need Boost to compile for the regular x86 architecture with gcc and I need cross compilation for an ARM processor of Texas Instruments.
The toolchain for the ARM processor is based on gcc. The tools like gcc, ar, ranlib are all prefixed with arm_v5t_le-. The documentation about cross compiling is somewhat limited. Here is what I have done:
I have added the following to the user-config.jam file: using gcc : arm : arm_v5t_le-g++ ;
Bjam is invoked from our Makefile like this: bjam toolset=gcc-arm --toolset-root=/opt/mv_pro_4.0/montavista/pro/devkit/arm/v5t_le/bin <some other options>
to compile for the ARM processor, and like this: bjam toolset=gcc <some other options>
for the x86 processor. The option --toolset-root is mentioned here.
I ran into the following problem: When I build our application for the ARM processor I get the following linker error: libboost_system-mt.a: could not read symbols: Archive has no index; run ranlib to add one. After I ran arm_v5t_le-ranlib on the archive it links without problems. My guess is that bjam uses ar in stead of arm-v5t_le-ar. How do I tell bjam which archiver it should use?
On a mailing list it was said to specify <archiver>
in user-config.jam as well, but unfortunately it does not seem to work. I end up with the same linker error.
Thanks.