Skip to content

Instantly share code, notes, and snippets.

@hisplan
Created March 15, 2017 14:27
Show Gist options
  • Save hisplan/46bb531c1b577b7b3797a92bbdbfb029 to your computer and use it in GitHub Desktop.
Save hisplan/46bb531c1b577b7b3797a92bbdbfb029 to your computer and use it in GitHub Desktop.
Upgrade gcc on Linux
wget https://ftp.gnu.org/gnu/gcc/gcc-6.3.0/gcc-6.3.0.tar.gz
cd gcc-6.3.0
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-6.3.0/configure --prefix=$HOME/gcc-6.3.0 --enable-languages=c,c++ --disable-multilib
make
make install
export PATH=~/gcc-6.3.0/bin:$PATH
export LD_LIBRARY_PATH=~/gcc-6.3.0/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=~/gcc-6.3.0/lib64:$LD_LIBRARY_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment