2015/12/10

升級 GCC 5.3.0

今天試升級 5.3

文件位置
https://gcc.gnu.org/gcc-5/

source code
svn co svn://gcc.gnu.org/svn/gcc/tags/gcc_5_3_0_release

下載位置(建議)
https://gcc.gnu.org/mirrors.html


解開後

執行 (需要開啟網路下載)
./contrib/download_prerequisites


設定(只支援c/c++)
./configure --enable-checking=release --enable-languages=c,c++ --disable-multilib

編譯 & 安裝
 make -j8 & make install

完成後, 重新開機

PS.
由於 GCC5的變更(https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html)
如果出現 std::__cxx11::string 或是
std::__cxx11::list 的錯誤
,編譯時需要加入參數  -D_GLIBCXX_USE_CXX11_ABI=0 來跟舊的 lib 相容