From 0ee9f8f3fa90bec8c3599910e8e88a8584c62da8 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sun, 1 Feb 2009 19:23:06 +0000 Subject: [PATCH] - newlib build inside GCC - omitted -no-gpopt Committed on the Free edition of March Hare Software CVSNT Server. Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/ git-svn-id: http://moon:8086/svn/vhdl/trunk@305 cc03376c-175c-47c8-b038-4cd826a8556b --- lib/CPUs/MIPS/bsp/toolchain/make.sh | 42 +++++++++++++---------------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/lib/CPUs/MIPS/bsp/toolchain/make.sh b/lib/CPUs/MIPS/bsp/toolchain/make.sh index 69c9ce6..c4fd829 100644 --- a/lib/CPUs/MIPS/bsp/toolchain/make.sh +++ b/lib/CPUs/MIPS/bsp/toolchain/make.sh @@ -5,6 +5,10 @@ PREFIX=/usr/local # --------------------------------------------------------------- # 1. Binutils bauen und installieren # --------------------------------------------------------------- +if [ ! -d ./binutils-2.19 ]; then + tar -xjf binutils-2.19.tar.bz2 +fi + if [ ! -d ./binutils-2.19_build ]; then mkdir -p binutils-2.19_build cd binutils-2.19_build @@ -17,37 +21,27 @@ else fi # --------------------------------------------------------------- -# 2. GCC bootstrapping +# 2. GCC & newlib bauen und installieren # --------------------------------------------------------------- +if [ ! -d ./newlib-1.16.0 ]; then + tar -xzf newlib-1.16.0.tar.gz +fi + +if [ ! -d ./gcc-4.3.2 ]; then + tar -xjf gcc-4.3.2.tar.bz2 + cd ./gcc-4.3.2 + ln -sf ../newlib-1.16.0/newlib/ . + cd .. +fi + if [ ! -d ./gcc-4.3.2_build ]; then mkdir -p gcc-4.3.2_build cd gcc-4.3.2_build - ../gcc-4.3.2/configure --target=$TARGET --prefix=$PREFIX --enable-languages="c,c++" --without-headers --with-newlib --with-float=soft --disable-multilib - CFLAGS_FOR_TARGET="-mno-gpopt" make all-gcc - make install-gcc - cd .. - -# --------------------------------------------------------------- -# 3. Newlib bauen und installieren -# --------------------------------------------------------------- - mkdir -p newlib-1.16.0_build - rm -rf newlib-1.16.0_build/* - cd newlib-1.16.0_build - ../newlib-1.16.0/configure --target=$TARGET --prefix=$PREFIX --with-float=soft --disable-multilib - TARGET_CFLAGS="-mno-gpopt" make - make install - cd .. - -# --------------------------------------------------------------- -# 4. GCC bauen und installieren -# --------------------------------------------------------------- - cd gcc-4.3.2_build - ../gcc-4.3.2/configure --target=$TARGET --prefix=$PREFIX --enable-languages="c,c++" --disable-shared --with-newlib --with-float=soft --disable-multilib - CFLAGS_FOR_TARGET="-mno-gpopt" make all + ../gcc-4.3.2/configure --target=$TARGET --prefix=$PREFIX --with-float=soft --with-newlib --verbose --enable-languages="c,c++" + make all make info make install cd .. else echo GCC is already built. fi -