./b2 $CPPFLAGS --toolset=gcc


FYI, note that $CPPFLAGS here depends on whether we want to build shared libs (pic) or static libs. 

For shared libs:

    export CPPFLAGS="cxxflags=-fPIC" 

For static libs:

    unset CPPFLAGS