I am documenting it here for my personal use, with the hope of being useful for others. You may use it with your own responsibility
- http://www.linuxfromscratch.org/blfs/view/svn/general/gcc.html
- https://gcc.gnu.org/install/configure.html
- https://gcc.gnu.org/git.html
- https://gcc.gnu.org/wiki/InstallingGCC
git clone git://gcc.gnu.org/git/gcc.git
cd gcc
git checkout releases/gcc-9.3.0
or download and extract it from here: https://ftp.gnu.org/gnu/gcc/gcc-9.3.0/
# requirements
sudo apt-get install flex bison
mkdir build
./contrib/download_prerequisites --directory=build
cd build
../configure \
--prefix=/usr \
--disable-multilib \
--with-system-zlib \
--enable-languages=c,c++,d,fortran,go,objc,obj-c++ \
--program-suffix=-9.3.0
make -j$(nproc)
sudo make install -j$(nproc)
Hi @yosoufe, thanks for this is helped me a lot. Just a small issue.
contrib/download_prerequisites
wants to be run from the directory wherecontrib
lives, so the commands are like this":