# Written by Uwe Hermann <uwe@hermann-uwe.de>, released as public domain.
# Modified by Piotr Esden-Tempski <piotr@esden.net>, released as public domain.
-TARGET=arm-none-eabi # Or: TARGET=arm-none-eabi
-PREFIX=${HOME}/arm-none-eabi # Install location of your final toolchain
-PARALLEL="" # Or: PARALLEL="-j 5" for 4 CPU's
-DARWIN_OPT_PATH=/opt/local # Path in which MacPorts or Fink is installed
+TARGET=arm-none-eabi # Or: TARGET=arm-elf
+PREFIX=${HOME}/arm-none-eabi # Install location of your final toolchain
+PARALLEL="" # Or: PARALLEL="-j 5" for 4 CPUs
+DARWIN_OPT_PATH=/opt/local # Path in which MacPorts or Fink is installed
BINUTILS=binutils-2.19.1
GCC=gcc-4.4.2
NEWLIB=newlib-1.17.0
-GDB=gdb-7.0
+GDB=gdb-7.1
LIBCMSIS=v1.10-2
LIBSTM32=v3.0.0-1
LIBSTM32USB=v3.0.1-1
echo "Found Linux OS."
GCCFLAGS=
GDBFLAGS=
+ BINUTILFLAGS=
;;
Darwin)
echo "Found Darwin OS."
--with-mpfr=${DARWIN_OPT_PATH} \
-with-libiconv-prefix=${DARWIN_OPT_PATH}"
GDBFLAGS="--disable-werror"
+ BINUTILFLAGS="--disable-werror"
;;
*)
echo "Found unknown OS. Aborting!"
--enable-multilib \
--with-gnu-as \
--with-gnu-ld \
- --disable-nls || exit
+ --disable-nls \
+ ${BINUTILFLAGS} || exit
echo "******************************************************************"
echo "* Building ${BINUTILS}"
echo "******************************************************************"
echo "******************************************************************"
echo "* Unpacking ${GCC}"
echo "******************************************************************"
- #tar xfvj ${SOURCES}/${GCC}.tar.bz2
+ tar xfvj ${SOURCES}/${GCC}.tar.bz2
cd build
echo "******************************************************************"
echo "* Configuring ${GCC}"
echo "******************************************************************"
-# ../${GCC}/configure --target=${TARGET} \
-# --prefix=${PREFIX} \
-# --enable-interwork \
-# --enable-multilib \
-# --enable-languages="c,c++" \
-# --with-newlib \
-# --disable-shared \
-# --with-gnu-as \
-# --with-gnu-ld \
-# --disable-nls \
-# ${GCCFLAGS} || exit
+ ../${GCC}/configure --target=${TARGET} \
+ --prefix=${PREFIX} \
+ --enable-interwork \
+ --enable-multilib \
+ --enable-languages="c,c++" \
+ --with-newlib \
+ --disable-shared \
+ --with-gnu-as \
+ --with-gnu-ld \
+ --disable-nls \
+ ${GCCFLAGS} || exit
echo "******************************************************************"
echo "* Building ${GCC}"
echo "******************************************************************"