
Step 1: Download the TarBall version of GCC version. If you want to take look at all the available versions, you can take a look at http://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/
For this blog entry, we will install GCC-10.4.0. First thing first, let’s get the Tarball
% wget http://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-10.4.0/gcc-10.4.0.tar.gz
Step 2: Make sure the bzip2 is available in the System
% yum install bzip2 bzip2-devel
Step 3: Untar the TarBall
% tar -zxvf gcc-10.4.0.tar.gz
% cd gcc-10.4.0
Step 4: Download the prerequisites and start configuring the GCC
% ./contrib/download_prerequisites
% ./configure --prefix=/usr/local/gcc-10.4.0 --disable-multilib --enable-languages=all
% make -j 8
% make install
Step 5: Verify the Installation
% gcc --version