Skip to content

Instantly share code, notes, and snippets.

@weimeng23
Last active August 20, 2024 07:47
Show Gist options
  • Save weimeng23/e46d64ce5cc47bf961fd7d50c3a4f2fe to your computer and use it in GitHub Desktop.
Save weimeng23/e46d64ce5cc47bf961fd7d50c3a4f2fe to your computer and use it in GitHub Desktop.
compile && install gcc from source
# install bzip2
# sudo yum install -y bzip2
# sudo apt-get install -y bzip2
wget https://gcc.gnu.org/pub/gcc/releases/gcc-14.2.0/gcc-14.2.0.tar.gz
tar -zxvf gcc-14.2.0.tar.gz
cd gcc-14.2.0
./contrib/download_prerequisites
mkdir build && cd build
../configure --prefix=/path/to/install --enable-threads=posix --enable-checking=release --disable-multilib --enable-languages=c,c++
make -j8
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment