Skip to content

Instantly share code, notes, and snippets.

@ambakshi
Created January 20, 2011 06:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ambakshi/787509 to your computer and use it in GitHub Desktop.
Save ambakshi/787509 to your computer and use it in GitHub Desktop.
Build gcc from source
#!/bin/sh
GCC_VER=4.5.2
wget -O /tmp/gcc-$GCC_VER.tar.bz2 ftp://ftp.gnu.org/gnu/gcc/gcc-$GCC_VER/gcc-$GCC_VER.tar.bz2
tar jxvf /tmp/gcc-$GCC_VER.tar.bz2
cd gcc-$GCC_VER
mkdir -p $HOME/opt/gcc/gcc-$GCC_VER
./configure --prefix=$HOME/opt/gcc/gcc-$GCC_VER --with-mpc
CPUCOUNT=`grep processor /proc/cpuinfo | wc -l`
make -j$CPUCOUNT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment