#!/bin/sh # LFS 6.7 GCC 4.5.1 Pass 1, Monkey's guide / shell script # Written by Jonathan Norman, 22 Feb 2011 # Change into source directory cd $LFS/sources # Unpack GCC and cd into it tar xf gcc-4.5.1.tar.bz2 cd gcc-4.5.1 # Unpack mpfr, gmp and mpc tar -jxf ../mpfr-3.0.0.tar.bz2 mv -v mpfr-3.0.0 mpfr tar -jxf ../gmp-5.0.1.tar.bz2 mv -v gmp-5.0.1 gmp tar -zxf ../mpc-0.8.2.tar.gz mv -v mpc-0.8.2 mpc # Create and enter build directory mkdir -v ../gcc-build cd ../gcc-build # Configure GCC with MPC, MPFR and GMP ../gcc-4.5.1/configure \ --target=$LFS_TGT --prefix=/tools \ --disable-nls --disable-shared --disable-multilib \ --disable-decimal-float --disable-threads \ --disable-libmudflap --disable-libssp \ --disable-libgomp --enable-languages=c \ --with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs \ --without-ppl --without-cloog # Compile make # Install make install # I'm sure there's a reason for this somewhere ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | \ sed 's/libgcc/&_eh/'` # Exit build directory cd $LFS/sources # Remove build / source directories rm -rf gcc-4.5.1 gcc-build # Ta Da!