gcc 5.4.0 - snugook1108/install GitHub Wiki
wget https://ftp.gnu.org/gnu/gcc/gcc-5.4.0/gcc-5.4.0.tar.gz
tar xzf gcc-5.4.0.tar.gz
cd gcc-5.4.0
wget https://ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-2.4.2.tar.bz2
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
../gcc-5.4.0/configure --prefix=$HOME/gcc-5.4.0 \
--disable-multilib \
--enable-languages=c,c++,fortran,jit \
--enable-checking=release \
--enable-host-shared \
--with-pic
make
make install
rm -rf ~/objdir
rm -rf ~/gcc-5.4.0.tar.gz
export PATH=$HOME/gcc-5.4.0/bin:$PATH
export LD_LIBRARY_PATH=$HOME/gcc-5.4.0/lib:$HOME/gcc-5.4.0/lib64:$LD_LIBRARY_PATH
export PATH=$HOME/gcc-5.4.0/bin:$PATH
export LD_LIBRARY_PATH=$HOME/gcc-5.4.0/lib/gcc/x86_64-pc-linux-gnu/5.4.0:$HOME/gcc-5.4.0/libexec/gcc/x86_64-pc-linux-gnu/5.4.0:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$HOME/gcc-5.4.0/lib64:$HOME/gcc-5.4.0/lib:$LD_LIBRARY_PATH