title: cc1: error: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C [-Werror]
body: <p>I need the <code>-std=c++11</code> flag for c++ modules when compile nginx. If I configure nginx with <code>--with-cc-opt="-std=c++11"</code> and then <code>make</code>. It gives me the error described in the title. How can I get it compile without modifing nginx source code or the compiler(for now it's gcc 4.8) version?</p>