ambakshi
1/20/2011 - 6:52 AM

Build gcc from source

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