Skip to content

Instantly share code, notes, and snippets.

@spin0us
Last active December 15, 2015 11:39
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 spin0us/5254193 to your computer and use it in GitHub Desktop.
Save spin0us/5254193 to your computer and use it in GitHub Desktop.
Server tips to install new gcc from sources and use it
### Install new version of gcc
tar xzf gcc-4.6.2.tar.gz
cd gcc-4.6.2
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-4.6.2/configure --prefix=/opt/gcc-4.6.2
make
make install
### Use new version to build another source
make CC=/opt/gcc-4.6.2/bin/gcc CXX=/opt/gcc-4.6.2/bin/g++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment