Boost logo

Boost Users :

Subject: Re: [Boost-users] Building boost with custom gcc/g++
From: Steve Lorimer (steve.lorimer_at_[hidden])
Date: 2013-01-07 15:34:45


I have successfully done this by doing the following:

1. export CC, CXX etc (to be location of custom gcc)
2. edit user-config.jam (specifying location of custom gcc)
3. run bootstrap
4. run b2 (specifying toolset=gcc)

Please excuse the variables I have in the following examples but I've taken
this from some scripts we have for our own in-house sdk. I think you should
be able to get the gist:

export AR="${GCC_LOC}/ar" export CC="${GCC_LOC}/gcc" export CPP="${GCC_LOC}/gcc
-E" export CXX="${GCC_LOC}/g++" export CXXCPP="${GCC_LOC}/g++ -E"

pushd boost_${BOOST_DL_VERSION} > /dev/null
 # add our compiler to the end of the boost jam config file
cat <<EOF > ./tools/build/v2/user-config.jam
using gcc : : ${GCC_LOC}/g++ ;
EOF

BOOST_LIBRARIES=filesystem,python,regex,system
        CONFIGURE_OPTIONS="--with-python-version=2.7
--with-python-root=${PYTHON_LOC}/${OS}/${ARCH}
 --with-python=${PYTHON_LOC}/${OS}/${ARCH}/bin/python"

        ./bootstrap.sh --prefix=${PREFIX}
--with-libraries=${BOOST_LIBRARIES} ${CONFIGURE_OPTIONS}

        ./b2 $CPPFLAGS --toolset=gcc



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net