Boost logo

Boost-Build :

From: BRIDGES Dick (Dick.Bridges_at_[hidden])
Date: 2005-06-24 13:35:45

To cross-compile the thread library, I need to pass -pthread and BOOST_HAS_THREADS through bjam but I can't seem to make it happen. Here's a précisrelating my attempt.

1) /usr/local/boost_1_32_0/tools/build/v2/user-config.jam modification:

# Configure gcc (default version)
# using gcc : 3.4 ;
using gcc : 3.4arm : /opt/crosstool/arm-softfloat-linux-gnu/gcc-3.3.3-glibc-2.3.2/bin/arm-softfloat-linux-gnu-c++ : \
<cxxflags>-pthread \


[somewhere]# echo $BOOST_BUILD_PATH

3) Change to example/hello and verify the bjam version.

[somewhere]# cd /usr/local/boost_1_32_0/tools/build/v2/example/hello
[hello]# bjam --version
Boost.Build V2 (Milestone 10)
Boost.Jam 03.01.10

4) bjam does not pass the cxxflags from user-config.jam

[hello]# bjam -n gcc-3.4arm
...found 9 targets...
...updating 5 targets...
MkDir1 bin
mkdir "bin"
MkDir1 bin/gcc-3.4arm
mkdir "bin/gcc-3.4arm"
MkDir1 bin/gcc-3.4arm/debug
mkdir "bin/gcc-3.4arm/debug"

gcc.compile.c++ bin/gcc-3.4arm/debug/hello.o

"/opt/crosstool/arm-softfloat-linux-gnu/gcc-3.3.3-glibc-2.3.2/bin/arm-softfloat-linux-gnu-c++" -Wall -ftemplate-depth-100 -I/opt/crosstool/arm-softfloat-linux-gnu/gcc-3.3.3-glibc-2.3.2/include/c++/3.3.3 -I/opt/crosstool/arm-softfloat-linux-gnu/gcc-3.3.3-glibc-2.3.2/include/c++/3.3.3/arm-softfloat-linux-gnu/bits -O0 -fno-inline -g -c -o "bin/gcc-3.4arm/debug/hello.o" "hello.cpp" bin/gcc-3.4arm/debug/hello

"/opt/crosstool/arm-softfloat-linux-gnu/gcc-3.3.3-glibc-2.3.2/bin/arm-softfloat-linux-gnu-c++" -o "bin/gcc-3.4arm/debug/hello" "bin/gcc-3.4arm/debug/hello.o" -g

...updated 5 targets...

5) bjam does not pass the cxxflags from the command line.

[hello]# bjam -n cxxflags=-pthread cxxflags=-DBOOST_HAS_THREADS gcc-3.4arm
<results>same as above</results>

I'm clearly doing something incorrectly, but I cannot figure out what. Anypointers will be seriously appreciated.

BTW: I don't know if it has anything to do with it, but you'll notice thatgcc-3.4arm doesn't match the 'real' compiler version of 3.3.3. If I try to change the nominal to gcc-3.3arm, I get an error (the gcc on the path is 3.4) and I could not find any way to ignore the path.

Dick Bridges



Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at