X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=summon-arm-toolchain;h=6f011a93c30ffc9389d5e0e62ad49c984541cb50;hb=5e10b6f3ddff097f8f47b9967df8919b8e1c01ce;hp=f4e7c47fff3858def73f55c4ea4679d529fd5bec;hpb=b9832923181344ca6b9799f3241ae204a9337e23;p=summon-arm-toolchain.git diff --git a/summon-arm-toolchain b/summon-arm-toolchain index f4e7c47..6f011a9 100755 --- a/summon-arm-toolchain +++ b/summon-arm-toolchain @@ -20,7 +20,6 @@ set -e ############################################################################## TARGET=arm-none-eabi # Or: TARGET=arm-elf PREFIX=${HOME}/sat # 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 # Set to 'sudo' if you need superuser privileges while installing SUDO= @@ -45,9 +44,10 @@ if [ ${USE_LINARO} == 0 ] ; then GCCURL=http://ftp.gnu.org/gnu/gcc/${GCC}/${GCC}.tar.gz else # For the Linaro GCC: - GCCVERSION=4.5-2010.08-1 + GCCRELEASE=4.5-2010.11-0 + GCCVERSION=4.5-2010.11-1 GCC=gcc-linaro-${GCCVERSION} - GCCURL=http://launchpad.net/gcc-linaro/4.5/${GCCVERSION}/+download/${GCC}.tar.gz + GCCURL=http://launchpad.net/gcc-linaro/4.5/${GCCRELEASE}/+download/${GCC}.tar.bz2 fi BINUTILS=binutils-2.20 @@ -62,6 +62,10 @@ LIBOPENSTM32=master # Flags section ############################################################################## +CPUS=$(getconf _NPROCESSORS_ONLN) +PARALLEL=-j$((CPUS + 1)) +echo "${CPUS} cpu's detected running make with '${PARALLEL}' flag" + GDBFLAGS= BINUTILFLAGS= @@ -69,7 +73,7 @@ if [ ${DEFAULT_TO_CORTEX_M3} == 0 ] ; then GCCFLAGS= else # To default to the Cortex-M3: - GCCFLAGS="--with-arch=armv7-m --with-mode=thumb" + GCCFLAGS="--with-arch=armv7-m --with-mode=thumb --with-float=soft" fi # Pull in the local configuration, if any @@ -291,9 +295,10 @@ if [ ! -e ${STAMPS}/${NEWLIB}.build ]; then --with-gnu-ld \ --disable-nls \ --disable-werror \ - --disable-newlib-supplied-syscalls + --disable-newlib-supplied-syscalls \ + --with-float=soft log "Building ${NEWLIB}" - make ${MAKEFLAGS} + make ${MAKEFLAGS} CFLAGS_FOR_TARGET="-msoft-float" CCASFLAGS="-msoft-float" install ${NEWLIB} install cd .. log "Cleaning up ${NEWLIB}" @@ -348,7 +353,7 @@ if [ ! -e ${STAMPS}/${GDB}.build ]; then fi if [ ${LIBSTM32_EN} != 0 ]; then -if [ ! -e .libcmsis-${LIBCMSIS}.build ]; then +if [ ! -e ${STAMPS}/libcmsis-${LIBCMSIS}.build ]; then unpack libcmsis-${LIBCMSIS} cd libcmsis-${LIBCMSIS} log "Building libcmsis-${LIBCMSIS}" @@ -356,11 +361,11 @@ if [ ! -e .libcmsis-${LIBCMSIS}.build ]; then install libcmsis-${LIBCMSIS} arch_prefix=${TARGET} prefix=${PREFIX} install cd .. log "Cleaning up libcmsis-${LIBCMSIS}" - touch .libcmsis-${LIBCMSIS}.build + touch ${STAMPS}/libcmsis-${LIBCMSIS}.build rm -rf libcmsis-${LIBCMSIS} fi -if [ ! -e .libstm32-${LIBSTM32}.build ]; then +if [ ! -e ${STAMPS}/libstm32-${LIBSTM32}.build ]; then unpack libstm32-${LIBSTM32} cd libstm32-${LIBSTM32} log "Building libstm32-${LIBSTM32}" @@ -368,11 +373,11 @@ if [ ! -e .libstm32-${LIBSTM32}.build ]; then install libstm32-${LIBSTM32} arch_prefix=${TARGET} prefix=${PREFIX} install cd .. log "Cleaning up libstm32-${LIBSTM32}" - touch .libstm32-${LIBSTM32}.build + touch ${STAMPS}/libstm32-${LIBSTM32}.build rm -rf libstm32-${LIBSTM32} fi -if [ ! -e .libstm32usb-${LIBSTM32USB}.build ]; then +if [ ! -e ${STAMPS}/libstm32usb-${LIBSTM32USB}.build ]; then unpack libstm32usb-${LIBSTM32USB} cd libstm32usb-${LIBSTM32USB} log "Building libstm32usb-${LIBSTM32USB}" @@ -380,12 +385,13 @@ if [ ! -e .libstm32usb-${LIBSTM32USB}.build ]; then install libstm32usb-${LIBSTM32USB} arch_prefix=${TARGET} prefix=${PREFIX} install cd .. log "Cleaning up libstm32usb-${LIBSTM32USB}" - touch .libstm32usb-${LIBSTM32USB}.build + touch ${STAMPS}/libstm32usb-${LIBSTM32USB}.build rm -rf libstm32usb-${LIBSTM32USB} fi fi if [ $LIBOPENSTM32_EN != 0 ]; then +if [ ! -e ${STAMPS}/libopenstm32-${LIBOPENSTM32}.build ]; then unpack libopenstm32-${LIBOPENSTM32} cd libopenstm32-${LIBOPENSTM32} log "Building libopenstm32-${LIBOPENSTM32}" @@ -393,6 +399,7 @@ if [ $LIBOPENSTM32_EN != 0 ]; then install libopenstm32-${LIBOPENSTM32} PREFIX=${TARGET} DESTDIR=${PREFIX} install cd .. log "Cleaning up libopenstm32-${LIBOPENSTM32}" - touch .libopenstm32-${LIBOPENSTM32}.build + touch ${STAMPS}/libopenstm32-${LIBOPENSTM32}.build rm -rf libopenstm32-${LIBOPENSTM32} fi +fi