Last active
December 5, 2022 03:20
-
-
Save ndunks/53337f376903dc0b8a390f98eca93540 to your computer and use it in GitHub Desktop.
Build/Compile GCC 11 in debian
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
#!/bin/bash | |
[ -f ~/app/gcc-11.1.0.tar.xz ] || \ | |
wget -O ~/app/gcc-11.1.0.tar.xz http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-11.1.0/gcc-11.1.0.tar.xz | |
[ -d ~/app/gcc-11.1.0 ] || tar -C ~/app -xvf ~/app/gcc-11.1.0.tar.xz | |
apt update | |
apt install -y \ | |
wget xz-utils bzip2 make autoconf gcc-multilib g++-multilib \ | |
libmpc-dev libgmp-dev | |
## Required for gcc | |
cd ~/app/gcc-11.1.0 | |
./contrib/download_prerequisites | |
mkdir -p build && cd build | |
../configure --program-prefix=v11- --enable-languages=c,c++ --prefix=$HOME/app/gcc1 | |
make -j3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment