Skip to content

Instantly share code, notes, and snippets.

@ndunks
Last active December 5, 2022 03:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ndunks/53337f376903dc0b8a390f98eca93540 to your computer and use it in GitHub Desktop.
Save ndunks/53337f376903dc0b8a390f98eca93540 to your computer and use it in GitHub Desktop.
Build/Compile GCC 11 in debian
#!/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