GDB_VER="6.8"
NEWLIB_VER="1.17.0"
GMP_VER="4.2.4"
-MPFR_VER="2.4.1"
+MPFR_VER="2.4.2"
INSIGHT_VER="6.8"
# Where you want to install the tools
BUILDDIR=${SRCDIR}/build-gnuarm4
# Where to get each of the toolchain components
-BINUTILS=ftp://gcc.gnu.org/pub/binutils/releases/binutils-${BINUTILS_VER}.tar.bz2
-GCCCORE=ftp://gcc.gnu.org/pub/gcc/releases/gcc-${GCC_VER}/gcc-core-${GCC_VER}.tar.bz2
-GPP=ftp://gcc.gnu.org/pub/gcc/releases/gcc-${GCC_VER}/gcc-g++-${GCC_VER}.tar.bz2
+BINUTILS=http://ftp.gnu.org/gnu/binutils/binutils-${BINUTILS_VER}.tar.bz2
+GCCCORE=http://ftp.gnu.org/gnu/gcc/gcc-${GCC_VER}/gcc-core-${GCC_VER}.tar.bz2
+GPP=http://ftp.gnu.org/gnu/gcc/gcc-${GCC_VER}/gcc-g++-${GCC_VER}.tar.bz2
NEWLIB=ftp://sources.redhat.com/pub/newlib/newlib-${NEWLIB_VER}.tar.gz
#INSIGHT=ftp://sourceware.org/pub/insight/releases/insight-${INSIGHT_VER}.tar.bz2
INSIGHT=http://mirrors.kernel.org/sources.redhat.com/insight/releases/insight-${INSIGHT_VER}.tar.bz2
#INSIGHT=http://www.mirrorservice.org/sites/sources.redhat.com/pub/insight/releases/insight-${INSIGHT_VER}.tar.bz2
GDB=ftp://sourceware.org/pub/gdb/releases/gdb-${GDB_VER}.tar.bz2
GMP=http://ftp.sunet.se/pub/gnu/gmp/gmp-${GMP_VER}.tar.bz2
-MPFR=http://www.mpfr.org/mpfr-current/mpfr-${MPFR_VER}.tar.bz2
+MPFR=http://mpfr.loria.fr/mpfr-current/mpfr-${MPFR_VER}.tar.bz2
# Common configuration options (i.e., things to pass to 'configure')
COMMON_CFG="--enable-interwork --target=arm-elf --program-prefix=arm-elf- --prefix=${DESTDIR} --disable-werror --enable-languages=c,c++ --enable-multilib --disable-shared"
# Extra configuration options for each toolchain component
BINUTILS_CFG=
-GCCCORE_CFG="--disable-nls --disable-threads --with-gcc --with-gnu-ld --with-gnu-as --with-dwarf2 --with-newlib --with-headers=../newlib-${NEWLIB_VER}/newlib/libc/include --disable-libssp --disable-libstdcxx-pch --disable-libmudflap --disable-libgomp -v"
+GCCCORE_CFG="--disable-nls --disable-threads --with-gcc --with-gnu-ld --with-gnu-as --with-dwarf2 --with-newlib --with-headers=${BUILDDIR}/newlib-${NEWLIB_VER}/newlib/libc/include --disable-libssp --disable-libstdcxx-pch --disable-libmudflap --disable-libgomp -v"
NEWLIB_CFG=
INSIGHT_CFG=
GDB_CFG=
mkdir -p ${BUILDDIR}
cd ${SRCDIR}
-echo Now downloading BINUTILS...
-wget ${WGET_OPTS} ${BINUTILS}
+if [[ -f all.downloaded ]]; then
+ echo Looks like all downloads are complete, skipping downloads
+else
+ echo Now downloading BINUTILS...
+ wget ${WGET_OPTS} ${BINUTILS}
+
+ echo Now downloading GCC...
+ wget ${WGET_OPTS} ${GCCCORE}
-echo Now downloading GCC...
-wget ${WGET_OPTS} ${GCCCORE}
+ echo Now downloading G++...
+ wget ${WGET_OPTS} ${GPP}
-echo Now downloading G++...
-wget ${WGET_OPTS} ${GPP}
+ echo Now downloading NEWLIB...
+ wget ${WGET_OPTS} ${NEWLIB}
-echo Now downloading NEWLIB...
-wget ${WGET_OPTS} ${NEWLIB}
+ echo Now downloading INSIGHT...
+ wget ${WGET_OPTS} ${INSIGHT}
-echo Now downloading INSIGHT...
-wget ${WGET_OPTS} ${INSIGHT}
+ echo Now downloading GDB...
+ wget ${WGET_OPTS} ${GDB}
-echo Now downloading GDB...
-wget ${WGET_OPTS} ${GDB}
+ echo Now downloading GMP...
+ wget ${WGET_OPTS} ${GMP}
-echo Now downloading GMP...
-wget ${WGET_OPTS} ${GMP}
+ echo Now downloading MPFR...
+ wget ${WGET_OPTS} ${MPFR}
-echo Now downloading MPFR...
-wget ${WGET_OPTS} ${MPFR}
+ touch all.downloaded
+fi
cd ${BUILDDIR}
if [[ -f binutils.built ]]; then
ln -s "${BUILDDIR}/gmp-${GMP_VER}" "${BUILDDIR}/gcc-${GCC_VER}/gmp"
tar -xjf ../`basename ${MPFR}`
ln -s "${BUILDDIR}/mpfr-${MPFR_VER}" "${BUILDDIR}/gcc-${GCC_VER}/mpfr"
+ tar -xzf ../`basename ${NEWLIB}`
echo ___________________ >> make.log
echo Looks like NEWLIB was already built.
else
echo Building NEWLIB...
- tar -xzf ../`basename ${NEWLIB}`
echo ___________________ >> make.log
echo Building newlib... >> make.log
cd `find . -maxdepth 1 -type d -name 'newlib*'`