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

> ../binutils-2.19/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 --disable-multilib
> CFLAGS_FOR_TARGET="-mno-gpopt" 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 einfügen
    "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 --disable-multilib
> TARGET_CFLAGS="-mno-gpopt" 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 --disable-multilib
> CFLAGS_FOR_TARGET="-mno-gpopt" make all
> make info
> make install
