Macで、Apple版じゃないgccを使用してBoostをビルドするときのエラー

いつも忘れるのでメモ

Boost users' mailing page: Re: [Boost-users] Boost Install on Mac OS X using GCC

(1) Create a file user-config.jam in the boost root with the
following contents:
using darwin
: std0x
: "/opt/local/bin/g++"
: -std=gnu++0x
;
(2) Because non-Apple versions of g++ do not support
-no-cpp-precomp, we need to remove this option in file
tools/build/v2/tools/darwin.jam. In line 485, change
flags darwin.compile OPTIONS : -no-cpp-precomp -gdwarf-2 ;
to
flags darwin.compile OPTIONS : -gdwarf-2 ;
(3) Now build Boost with

./bootstrap.sh
./bjam --with-toolset=darwin-std0x