title: Boost arm cross-compilation fails
body: <p>I'm having a hard time trying to cross-compile the boost library to arm platform.<br>
  I'm getting the sources from <a href="http://sourceforge.net/projects/boost/files/boost/" rel="nofollow">http://sourceforge.net/projects/boost/files/boost/</a> . I've tried ver. 1.55, 1.54, and 1.49 they all behave the same. </p>
  
  <p>After unpacking i use <code>./bootstrap.sh --prefix=/blah/arm-none-eabi</code>. (the arm-none-eabi catalog contains cross-compilers <code>include</code> and <code>lib</code> catalogs, amont others.). Next I update the file <code>tools/build/v2/user-config.jam</code> by adding <code>using gcc : arm : arm-none-eabi-g++ ;</code> (ARM EABI Sourcery CodeBench Lite 2013.05-23 crosscompiler, gcc version 4.7.3). After that, I run <code>./bjam --prefix=/blah/arm-none-eabi/ toolset=gcc-arm</code>. This gives me a lot of errors like: </p>
  
  <pre><code>`"arm-none-eabi-g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread  -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_USE_LIB=1 -DNDEBUG  -I"." -c -o "bin.v2/libs/wave/build/gcc-arm/release/link-static/threading-multi/wave_config_constant.o" "libs/wave/src/wave_config_constant.cpp"
  
  ...failed gcc.compile.c++ bin.v2/libs/wave/build/gcc-arm/release/link-static/threading-multi/wave_config_constant.o...
  gcc.compile.c++ bin.v2/libs/wave/build/gcc-arm/release/link-static/threading-multi/cpplexer/re2clex/aq.o
  arm-none-eabi-g++: error: unrecognized command line option '-pthread'`
  </code></pre>
  
  <p>I modified the file <code>$BOOST/tools/build/v2/tools/gcc.jam</code></p>
  
  <pre><code>-case *       : option = -pthread ; libs = rt ;
  +case *       : option = -lpthread ; libs = rt ;
  </code></pre>
  
  <p>After running the cross compilation again i get a lot of </p>
  
  <pre><code>"arm-none-eabi-g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pedantic -lpthread -fPIC -Wextra -Wno-long-long -Wno-variadic-macros -pedantic -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DNDEBUG  -I"." -c -o "bin.v2/libs/chrono/build/gcc-arm/release/threading-multi/chrono.o" "libs/chrono/src/chrono.cpp"
  
  ...failed gcc.compile.c++ bin.v2/libs/chrono/build/gcc-arm/release/threading-multi/chrono.o...
  gcc.compile.c++ bin.v2/libs/chrono/build/gcc-arm/release/threading-multi/thread_clock.o
  gcc.compile.c++ bin.v2/libs/chrono/build/gcc-arm/release/threading-multi/process_cpu_clocks.o
  ...skipped &lt;pbin.v2/libs/chrono/build/gcc-arm/release/threading-multi&gt;libboost_chrono.so.1.54.0 for lack of &lt;pbin.v2/libs/chrono/build/gcc-arm/release/threading-multi&gt;chrono.o...
  ...skipped &lt;pstage/lib&gt;libboost_chrono.so.1.54.0 for lack of &lt;pbin.v2/libs/chrono/build/gcc-arm/release/threading-multi&gt;libboost_chrono.so.1.54.0...
  ...skipped &lt;pstage/lib&gt;libboost_chrono.so for lack of &lt;pstage/lib&gt;libboost_chrono.so.1.54.0...
  gcc.link.dll bin.v2/libs/context/build/gcc-arm/release/threading-multi/libboost_context.so.1.54.0
  /home/skramer/PP/MGR/arm-2013.05/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld: cannot find -lrt
  collect2: error: ld returned 1 exit status
  
      "arm-none-eabi-g++"    -o "bin.v2/libs/context/build/gcc-arm/release/threading-multi/libboost_context.so.1.54.0" -Wl,-h -Wl,libboost_context.so.1.54.0 -shared -Wl,--start-group "bin.v2/libs/context/build/gcc-arm/release/threading-multi/asm/make_arm_aapcs_elf_gas.o" "bin.v2/libs/context/build/gcc-arm/release/threading-multi/asm/jump_arm_aapcs_elf_gas.o"  -Wl,-Bstatic  -Wl,-Bdynamic -lrt -Wl,--end-group -lpthread 
  
  ...failed gcc.link.dll bin.v2/libs/context/build/gcc-arm/release/threading-multi/libboost_context.so.1.54.0...
  ...skipped &lt;pstage/lib&gt;libboost_context.so.1.54.0 for lack of &lt;pbin.v2/libs/context/build/gcc-arm/release/threading-multi&gt;libboost_context.so.1.54.0...
  ...skipped &lt;pstage/lib&gt;libboost_context.so for lack of &lt;pstage/lib&gt;libboost_context.so.1.54.0...
  gcc.compile.c++ bin.v2/libs/coroutine/build/gcc-arm/release/link-static/threading-multi/detail/standard_stack_allocator_posix.o
  libs/coroutine/src/detail/standard_stack_allocator_posix.cpp:14:22: fatal error: sys/mman.h: No such file or directory
  compilation terminated.
  
   "arm-none-eabi-g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -lpthread  -DBOOST_ALL_NO_LIB=1 -DNDEBUG  -I"." -c -o "bin.v2/libs/coroutine/build/gcc-arm/release/link-static/threading-multi/detail/coroutine_context.o" "libs/coroutine/src/detail/coroutine_context.cpp"
  
  ...failed gcc.compile.c++ bin.v2/libs/coroutine/build/gcc-arm/release/link-static/threading-multi/detail/coroutine_context.o...
  ...skipped &lt;pbin.v2/libs/coroutine/build/gcc-arm/release/link-static/threading-multi&gt;libboost_coroutine.a(clean) for lack of &lt;pbin.v2/libs/coroutine/build/gcc-arm/release/link-static/threading-multi&gt;detail/standard_stack_allocator_posix.o...
  ...skipped &lt;pbin.v2/libs/coroutine/build/gcc-arm/release/link-static/threading-multi&gt;libboost_coroutine.a for lack of &lt;pbin.v2/libs/coroutine/build/gcc-arm/release/link-static/threading-multi&gt;detail/standard_stack_allocator_posix.o...
  ...skipped &lt;pstage/lib&gt;libboost_coroutine.a for lack of &lt;pbin.v2/libs/coroutine/build/gcc-arm/release/link-static/threading-multi&gt;libboost_coroutine.a...
  gcc.compile.c++ bin.v2/libs/date_time/build/gcc-arm/release/threading-multi/gregorian/greg_month.o
  gcc.compile.c++ bin.v2/libs/date_time/build/gcc-arm/release/threading-multi/gregorian/greg_weekday.o
  gcc.compile.c++ bin.v2/libs/date_time/build/gcc-arm/release/threading-multi/gregorian/date_generators.o
  gcc.link.dll bin.v2/libs/date_time/build/gcc-arm/release/threading-multi/libboost_date_time.so.1.54.0
  /home/skramer/PP/MGR/arm-2013.05/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld: cannot find -lrt
  collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p>I don't really know what to do now. I've been googling around for a few hours but with no result. I've tried using b2 instead of bjam - nothing changed. I've also tried a different arm cross-compilator - Xilinx EABI Sourcery CodeBench Lite 2012.03-83 (gcc 4.6.3) which seems to be producing less errors but still a lot of syntax and No such file or directory like errors are present. How can I get boost working at arm platform?</p>