Created
April 3, 2024 08:33
-
-
Save Roninkoi/e3915593ec4c7fe9e2df67915d3c1ffb to your computer and use it in GitHub Desktop.
Build GCC from Git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # clone and build gcc for linux, link bin | |
| gccpath="/home/ronialek/gcc-test" | |
| mkdir $gccpath | |
| cd $gccpath | |
| git clone git://gcc.gnu.org/git/gcc.git . | |
| git checkout releases/gcc-13 | |
| ./contrib/download_prerequisites | |
| mkdir build | |
| cd build | |
| ../configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=$gccpath --enable-checking=release --enable-languages=c,c++,fortran --disable-multilib --program-suffix=-git | |
| make -j8 | |
| make install-strip | |
| ln -s $gccpath/bin/gcc-git ~/.local/bin/gcc-git | |
| ln -s $gccpath/bin/g++-git ~/.local/bin/g++-git | |
| ln -s $gccpath/bin/gfortran-git ~/.local/bin/gfortran-git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment