GCC 10.2 Ubuntu
sudo apt install build-essential wget m4 flex bison libgmp-dev libmpfr-dev libmpc-dev
mkdir src && cd src
tar -xvf ../gcc-10.2.0.tar.xz
cd gcc-10.2.0/
mkdir build && cd build
../gcc-10.2.0/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/opt/gcc-10.2.0 --enable-checking=release --enable-languages=c,c++,d,fortran,go --disable-multilib --program-suffix=-10.2
make -j 12
make install-strip
export PATH="$PATH":/opt/gcc-10.2.0/bin
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":/opt/gcc-10.2.0/lib64
export CC=/opt/gcc-10.2.0/bin/gcc-10.2
export CXX=/opt/gcc-10.2.0/bin/g++-10.2
https://solarianprogrammer.com/2016/10/07/building-gcc-ubuntu-linux/