X-Git-Url: https://git.gag.com/?p=fw%2Fcortex-toolchain;a=blobdiff_plain;f=summon-arm-toolchain;h=892c687563be7fa940c1dc193a836e79495cb1ae;hp=9e2a6e0da122a999a717584865212e85bf01c3bb;hb=e1cdb029e276a002b8720224951ddb4702386367;hpb=14b533046db0dec0889fb8b909d94e538ab0d5ed diff --git a/summon-arm-toolchain b/summon-arm-toolchain index 9e2a6e0..892c687 100755 --- a/summon-arm-toolchain +++ b/summon-arm-toolchain @@ -2,20 +2,20 @@ # Written by Uwe Hermann , released as public domain. # Modified by Piotr Esden-Tempski , 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 LIBOPENSTM32=master -LIBSTM32_EN=1 +LIBSTM32_EN=0 LIBOPENSTM32_EN=0 SUMMON_DIR=$(pwd) @@ -23,18 +23,19 @@ SOURCES=${SUMMON_DIR}/sources export PATH="${PREFIX}/bin:${PATH}" +GCCFLAGS= +GDBFLAGS= +BINUTILFLAGS= + case "$(uname)" in Linux) echo "Found Linux OS." - GCCFLAGS= - GDBFLAGS= ;; Darwin) echo "Found Darwin OS." GCCFLAGS="--with-gmp=${DARWIN_OPT_PATH} \ --with-mpfr=${DARWIN_OPT_PATH} \ -with-libiconv-prefix=${DARWIN_OPT_PATH}" - GDBFLAGS="--disable-werror" ;; *) echo "Found unknown OS. Aborting!" @@ -52,13 +53,13 @@ echo "Downloading binutils sources..." wget -c http://ftp.gnu.org/gnu/binutils/${BINUTILS}.tar.bz2 echo "Downloading gcc sources..." -wget -c ftp://ftp.gnu.org/gnu/gcc/${GCC}/${GCC}.tar.bz2 +wget -c http://ftp.gnu.org/gnu/gcc/${GCC}/${GCC}.tar.bz2 echo "Downloading newlib sources..." -wget -c ftp://sources.redhat.com/pub/newlib/${NEWLIB}.tar.gz +wget -c --no-passive-ftp ftp://sources.redhat.com/pub/newlib/${NEWLIB}.tar.gz echo "Downloading gdb sources..." -wget -c ftp://ftp.gnu.org/gnu/gdb/${GDB}.tar.bz2 +wget -c http://ftp.gnu.org/gnu/gdb/${GDB}.tar.bz2 if [ ${LIBSTM32_EN} != 0 ]; then if [ ! -e libcmsis-${LIBCMSIS}.tar.bz2 ]; then @@ -125,7 +126,9 @@ if [ ! -e .${BINUTILS}.build ]; then --enable-multilib \ --with-gnu-as \ --with-gnu-ld \ - --disable-nls || exit + --disable-nls \ + --disable-werror \ + ${BINUTILFLAGS} || exit echo "******************************************************************" echo "* Building ${BINUTILS}" echo "******************************************************************" @@ -162,6 +165,7 @@ if [ ! -e .${GCC}-boot.build ]; then --with-gnu-as \ --with-gnu-ld \ --disable-nls \ + --disable-werror \ ${GCCFLAGS} || exit echo "******************************************************************" echo "* Building ${GCC}-boot" @@ -195,6 +199,7 @@ if [ ! -e .${NEWLIB}.build ]; then --with-gnu-as \ --with-gnu-ld \ --disable-nls \ + --disable-werror \ --disable-newlib-supplied-syscalls || exit echo "******************************************************************" echo "* Building ${NEWLIB}" @@ -217,22 +222,23 @@ if [ ! -e .${GCC}.build ]; then 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 \ + --disable-werror \ + ${GCCFLAGS} || exit echo "******************************************************************" echo "* Building ${GCC}" echo "******************************************************************" @@ -262,6 +268,7 @@ if [ ! -e .${GDB}.build ]; then --prefix=${PREFIX} \ --enable-interwork \ --enable-multilib \ + --disable-werror \ ${GDBFLAGS} || exit echo "******************************************************************" echo "* Building ${GDB}"