Boost logo

Boost-Build :

Subject: [Boost-build] Thread Library for XilKernel on PowerPC
From: Randall Plate (randall.plate_at_[hidden])
Date: 2011-08-04 20:00:50


I am trying to build the Boost Thread library for use on a PowerPC on a
Xilinx ML510 development board that is running XilKernel. As Boost does
not explicitly support this operating system, I am cross-compiling using
the target-os=elf option since the Xilinx SDK compiler produces .elf
files for the PowerPC. This works fine for other Boost libraries (e.g
regex), but not for thread.

First problem is that BOOST_DISABLE_THREADS is defined in libstdcpp3.hpp
due to __GLIBCXX__ being defined, but neither _GLIBCXX_HAVE_GTHR_DEFAULT
nor _GLIBCXX__PTHREADS being defined. This of course causes the
"Threading support unavailable: it has been explicitly disabled with
BOOST_DISABLE_THREADS" error from requires_threads.hpp.

Second problem is that it is trying to write the library files to a
win32 directory
(..\build\gcc-ppc\release\link-static\target-os-elf\threading-multi\win32),
which doesn't seem correct since I am building for a non-windows
platform. It also reports errors such as "windows.h: no such file or
directory". The regex library that I successfully built was written to
the "..\threading-multi\" directory, not win32.

I am calling bjam as follows:

bjam -d+2 toolset=gcc-ppc target-os=elf
-sGCC_ROOT_DIRECTORY=C:\Xilinx\ISE_DS\EDK\gnu\powerpc-eabi\nt64\bin
link=static --layout=system --with-thread

I have modified the user-config.jam file as follows:

using gcc : ppc :
C:/Xilinx/ISE_DS/EDK/gnu/powerpc-eabi/nt64/bin/powerpc-eabi-gcc : ^
  More?
<archiver>C:/Xilinx/ISE_DS/EDK/gnu/powerpc-eabi/nt64/bin/powerpc-eabi-ar ^
  More? toolset.add-requirements <toolset>gcc-ppc:<target-os>elf
<toolset>gcc-ppc:<threadapi>pthread ^
  More? <compileflags>-D_POSIX_SOURCE -Wall -g3 -c -fmessage-length=0 -D
__XMK__ ^
  More? -IC:/Xilinx/ISE_DS/EDK/gnu/powerpc-eabi/nt64/include/c++/4.1.1 ^
  More?
-IC:/Xilinx/ISE_DS/EDK/gnu/powerpc-eabi/nt64/include/c++/4.1.1/backward ^
  More?
-IC:/Xilinx/ISE_DS/EDK/gnu/powerpc-eabi/nt64/include/c++/4.1.1/powerpc-eabi
^
  More?
-IC:/Xilinx/ISE_DS/EDK/gnu/powerpc-eabi/nt64/lib/gcc/powerpc-eabi/4.1.1/include
^
  More? -IC:/Xilinx/ISE_DS/EDK/gnu/powerpc-eabi/nt64/powerpc-eabi/include ^
  More? -mcpu=440 ^
  More? <linkflags>-Wl,-T -Wl,../src/lscript.ld
-LC:/Xilinx/ISE_DS/EDK/gnu/powerpc-eabi/nt64/powerpc-eabi/lib -mcpu=440 ;

Any suggestions on why this is not working?

Thanks,
Randall


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk