unset CC CXX F77 CFLAGS CPPFLAGS FFLAGS export CC=/usr/sfw/bin/gcc cd src/ wget http://ftp.gnu.org/gnu/gcc/gcc-4.1.1/gcc-core-4.1.1.tar.bz2 wget http://ftp.gnu.org/gnu/gcc/gcc-4.1.1/gcc-g++-4.1.1.tar.bz2 gtar jxf gcc-core-4.1.1.tar.bz2 gtar jxf gcc-g++-4.1.1.tar.bz2 cd gcc-4.1.1/ mkdir build cd build/ ../configure \ --prefix=/opt/extra \ --with-as=/usr/sfw/bin/gas \ --with-gnu-as \ --with-ld=/usr/ccs/bin/ld \ --without-gnu-ld \ --enable-languages=c,c++ \ --enable-shared gmake -j2 bootstrap sudo gmake install