Skip to content

Instantly share code, notes, and snippets.

@imweijh
Created March 26, 2025 13:14
Show Gist options
  • Save imweijh/13025f6c020878e455be1e7ebc1583fb to your computer and use it in GitHub Desktop.
Save imweijh/13025f6c020878e455be1e7ebc1583fb to your computer and use it in GitHub Desktop.
Your new compiler will be at ~/gcc10/bin/gcc
sudo apt install -y curl build-essential libgmp-dev libmpfr-dev libmpc-dev
mkdir /tmp/$$ && cd /tmp/$$
curl -s https://ftp.gnu.org/gnu/gcc/gcc-10.3.0/gcc-10.3.0.tar.xz | tar xJ
mkdir build && cd build
../gcc-10.3.0/configure --prefix=$HOME/gcc10 \
--disable-dependency-tracking \
--disable-nls \
--disable-multilib \
--enable-default-pie \
--enable-languages=c,c++
make -j$(nproc)
make install
@imweijh
Copy link
Author

imweijh commented Mar 26, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment