Created
March 26, 2025 13:14
-
-
Save imweijh/13025f6c020878e455be1e7ebc1583fb to your computer and use it in GitHub Desktop.
Your new compiler will be at ~/gcc10/bin/gcc
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 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gcc.gnu.org/wiki/InstallingGCC