Tested on Ubuntu 16.04.2
-
wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-6.3.0/gcc-6.3.0.tar.gz
-
tar xzf gcc-6.3.0.tar.gz
# decompress -
cd gcc-6.3.0
-
./contrib/download_prerequisites
# recent compiler binaries have this handy script :) -
cd ..
-
mkdir gcc63
-
cd gcc63
-
$PWD/../gcc-6.3.0/configure --prefix=$HOME/gcc-6.3.0 --enable-languages=c,c++ --disable-multilib
# on 64-bit system, thus add --disable-multilib -
time make
- time make -j 8 # use 8 cores to do compiling
-
time make install