# ---------------------------------------------------------------
# 1. Binutils bauen und installieren
# ---------------------------------------------------------------
> tar -xzf binutils-2.18.tar.gz
> mkdir binutils-2.18_build
> cd binutils-2.18_build

> ../binutils-2.18/configure --target=mipsel-elf --prefix=/usr/local
> make
> make install
 
# ---------------------------------------------------------------
# 2. GCC bootstrapping 
# ---------------------------------------------------------------
> tar -xzf gcc-4.3.2.tar.gz
> mkdir gcc-4.3.2_build
> cd gcc-4.3.2_build
> ../gcc-4.3.2/configure --target=mipsel-elf --prefix=/usr/local --enable-languages=c,c++ --without-headers --with-newlib --with-float=soft
> CFLAGS_FOR_TARGET="-G 0 -g -O2" make all-gcc
> make info-gcc
> make install-gcc
 
# ---------------------------------------------------------------
# 3. Newlib bauen und installieren
# ---------------------------------------------------------------
> tar -xzf newlib-1.16.0.tar.gz
! Bug in newlib-1.16.0/newlib/libc/machine/mips/strlen.c.
  Newlib von Hand patchen (32-bit MIPS targets):
    "lbu $3,0($4)\n"
    "nop\n"           <= nop einfgen
    "bnez $3,1b\n"

> mkdir newlib-1.16.0_build
> cd newlib-1.16.0_build
> ../newlib-1.16.0/configure --target=mipsel-elf --prefix=/usr/local --with-float=soft
> TARGET_CFLAGS="-G 0 -g -O2" make all
> make install

# ---------------------------------------------------------------
# 4. GCC bauen und installieren
# ---------------------------------------------------------------
> cd gcc-4.3.2_build
> ../gcc-4.3.2/configure --target=mipsel-elf --prefix=/usr/local --enable-languages=c,c++ --disable-shared --with-newlib --with-float=soft
> CFLAGS_FOR_TARGET="-G 0 -g -O2" make all
> make info
> make install
 
