在解壓出的boost文件夾中tools/build/v2/user-config.jam文件中添加如下configuration
# Configure gcc-4.8
using gcc
: 4.8
: "/usr/bin/g++-4.8"
: <cxxflags>"-std=c++11 -march=native -flto -O3" <linkflags>"-flto -O3"
;
然後,使用./b2 toolset=gcc-4.8來編譯BOOST即可。