Skip to content

Instantly share code, notes, and snippets.

@GavinRay97
Last active December 10, 2022 21:03
Show Gist options
  • Save GavinRay97/21b571a051ef8a27fd4ff7592523a885 to your computer and use it in GitHub Desktop.
Save GavinRay97/21b571a051ef8a27fd4ff7592523a885 to your computer and use it in GitHub Desktop.
Compile GCC from source
$ 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