2013年7月10日 星期三

Install latest gcc/g++ manually

  1. sudo yum -y install gcc-c++
  2. sudo yum -y install gcc-c++ glibc-devel.i686
  3. sudo yum -y install zip
  4. Donwload and extract latest GNU gmp, ex: gmp-5.1.2.tar.gz
    Enter extracted folder
    ./configure --prefix=/usr --exec-prefix=/usr;make;sudo make install
  5. Donwload and extract latest GNU mpfr, ex: mpfr-3.1.2.tar.gz
    Enter extracted folder
    ./configure;make;sudo make install
  6. Donwload and extract latest GNU mpc, ex: mpc-1.0.1.tar.gz
    Enter extracted folder
    ./configure;make;sudo make install
  7. Add the gmp, mpfr, mpc to ld search list:
    Add the following line to /etc/ld.so.conf.d/usr.local.conf
    /usr/local/lib
  8. sudo ldconfig
  9. Donwload and extract latest GNU gcc, ex: gcc-4.8.1.tar.gz
    Enter extracted folder
    ./configure;make;sudo make install
  • Replace make with make -j8 if you have 8 CPU cores. make -j32 if you want to build with 32 threads.
    make gcc will take very long time, you should use as more cores as you can.
  • The SOP is tested under gcc 4.7.x and 4.8.x

沒有留言: