GCC

We need a modern C++17 capable compiler. Our minimum requirements are: GCC 9.0.0, Clang 14.0.6. This section will focus on building a GCC 13.3.1 compiler stack.

Obtain GCC source:

curl -L -O http://mirrors.concertpass.com/gcc/releases/gcc-13.3.1/gcc-13.3.1.tar.gz
tar -xf gcc-13.3.1.tar.gz -C .

Obtain GCC pre-reqs:

cd gcc-13.3.1
./contrib/download_prerequisites

Configure GCC using our recommended arguments, in addition to any optimizations you require:

mkdir gcc-build
cd gcc-build

../configure --prefix=/target/installation/path/gcc-13.3.1 \
--disable-multilib \
--enable-languages=c,c++,fortran,jit \
--enable-checking=release \
--enable-host-shared \
--with-pic

With configure complete (and error free), build and install GCC:


make -j 6
make install

Follow the onscreen instructions on how to make use of your new compiler.