#!/bin/sh TARGET=mipsel-elf PREFIX=/usr/local # --------------------------------------------------------------- # 1. Binutils bauen und installieren # --------------------------------------------------------------- if [ ! -d ./binutils-2.19_build ]; then mkdir -p binutils-2.19_build cd binutils-2.19_build ../binutils-2.19/configure --target=$TARGET --prefix=$PREFIX make make install cd .. else echo binutils is already built. fi # --------------------------------------------------------------- # 2. GCC bootstrapping # --------------------------------------------------------------- if [ ! -d ./gcc-4.3.2_build ]; then mkdir -p gcc-4.3.2_build cd gcc-4.3.2_build ../gcc-4.3.2/configure --target=$TARGET --prefix=$PREFIX --enable-languages="c,c++" --without-headers --with-newlib --with-float=soft --disable-multilib CFLAGS_FOR_TARGET="-mno-gpopt" make all-gcc make install-gcc cd .. # --------------------------------------------------------------- # 3. Newlib bauen und installieren # --------------------------------------------------------------- mkdir -p newlib-1.16.0_build rm -rf newlib-1.16.0_build/* cd newlib-1.16.0_build ../newlib-1.16.0/configure --target=$TARGET --prefix=$PREFIX --with-float=soft --disable-multilib TARGET_CFLAGS="-mno-gpopt" make make install cd .. # --------------------------------------------------------------- # 4. GCC bauen und installieren # --------------------------------------------------------------- cd gcc-4.3.2_build ../gcc-4.3.2/configure --target=$TARGET --prefix=$PREFIX --enable-languages="c,c++" --disable-shared --with-newlib --with-float=soft --disable-multilib CFLAGS_FOR_TARGET="-mno-gpopt" make all make info make install cd .. else echo GCC is already built. fi