Last active
December 10, 2022 21:03
-
-
Save GavinRay97/21b571a051ef8a27fd4ff7592523a885 to your computer and use it in GitHub Desktop.
Compile GCC from source
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
$ sudo dnf install flex | |
$ | |
$ git clone git://gcc.gnu.org/git/gcc.git gcc-dev | |
$ cd gcc-dev | |
$ | |
$ ./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=/usr/local/gcc-dev \ | |
--enable-checking=release \ | |
--enable-languages=c,c++ \ | |
--disable-multilib \ | |
--disable-nls \ | |
--with-system-zlib | |
$ | |
$ make -j 16 | |
$ sudo make install-strip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment