# binutils
ln -s binutils-2.17 binutils
cd binutils
gmake -k distclean
./configure \
--target=arm-elf \
--prefix=/usr/local \
--enable-interwork \
--enable-multilib \
--with-float=soft
gmake all
gmake install
cd ..
# Chicken and egg problem: Need to install newlib includes
# here so gcc will build...
# 1st part of gcc
ln -s gcc-4.1.1 gcc
cd gcc
gmake -k distclean
./configure \
--target=arm-elf \
--prefix=/usr/local \
--enable-interwork \
--enable-multilib \
--with-float=soft \
--enable-languages="c,c++" \
--with-newlib \
--with-headers=../newlib/newlib/libc/include \
--with-gnu-as \
--with-gnu-ld \
--disable-shared \
--disable-libssp
gmake all-gcc
gmake install-gcc
cd ..
# newlib
ln -s newlib-1.16.0 newlib
cd newlib
# Patch CFLAGS_FOR_TARGET
# (Be sure to insert new defines at the front of the rule)
rcsdiff -r1.1 Makefile.in
===================================================================
RCS file: RCS/Makefile.in,v
retrieving revision 1.1
diff -r1.1 Makefile.in
382c382
< CFLAGS_FOR_TARGET = -O2 -g $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \
---
> CFLAGS_FOR_TARGET = -DINTEGER_ONLY -D_vfprintf_r=_vfiprintf_r -DPREFER_SIZE_OVER_SPEED -DNO_FLOATING_POINT -O2 -g $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \
gmake -k distclean
./configure \
--target=arm-elf \
--prefix=/usr/local \
--enable-interwork \
--enable-multilib \
--disable-newlib-supplied-syscalls \
--with-gnu-ld \
--with-gnu-as \
--disable-newlib-io-float
gmake all
gmake install
cd ..
# 2nd part of gcc
cd gcc
gmake all
gmake install
cd ..
# gdb
ln -s gdb-6.7 gdb
cd gdb
gmake -k distclean
./configure \
--target=arm-elf \
--prefix=/usr/local \
--enable-interwork \
--enable-multilib \
--with-float=soft \
--includedir=/usr/local/include \
--with-gnu-as \
--with-gnu-ld \
--disable-libssp
gmake all
# when the make bombs looking for libintl.h edit bfd/Makefile and
# append -I/usr/local/include to the line with -Wmissing-prototypes
gmake all
# when the make bombs looking for libintl.h edit opcodes/Makefile and
# append -I/usr/local/include to the line with -Wmissing-prototypes
gmake all
gmake install
cd ..
Copyright © 2008, 2009, 2010
Craig Leres