curl https://ftp.gnu.org/gnu/gcc/gcc-5.4.0/gcc-5.4.0.tar.bz2 -O |
echo "extracting files..." |
tar xvfj gcc-5.4.0.tar.bz2 |
echo "Installing dependencies..." |
yum install gmp-devel mpfr-devel libmpc-devel |
echo "Configure and install..." |
../gcc-5.4.0/configure --enable-languages=c,c++ --disable-multilib |
make -j $(nproc) && make install
echo "Downloading gcc source files..." |
----------------------------------------------------------
gcc g++ are installed at /usr/local/bin/
required to link the gcc g++ cc for /usr/bin
cp /usr/local/lib64/libstdc++.so.6.0.21 /lib64 cd /lib64 rm -rf libstdc++.so.6 ln -s libstdc++.so.6.0.21 libstdc++.so.6