- minor changes

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@349 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
2009-02-14 16:36:23 +00:00
parent 1c1eae6e8e
commit d06519bd49
+129 -25
View File
@@ -2,46 +2,150 @@
TARGET=mipsel-elf TARGET=mipsel-elf
PREFIX=/usr/local PREFIX=/usr/local
SRC_BINUTILS=binutils-2.19
SRC_GCC=gcc-4.3.3
SRC_NEWLIB=newlib-1.16.0
SRC_GMP=gmp-4.2.4
SRC_MPFR=mpfr-2.4.0
# --------------------------------------------------------------- # ---------------------------------------------------------------
# 1. Binutils bauen und installieren # 1. Binutils bauen und installieren
# --------------------------------------------------------------- # ---------------------------------------------------------------
if [ ! -d ./binutils-2.19 ]; then if [ ! -e $SRC_BINUTILS.tar.bz2 ]; then
tar -xjf binutils-2.19.tar.bz2 echo Downloading $SRC_BINUTILS
wget ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.gnu.org/binutils/$SRC_BINUTILS.tar.bz2 || exit 1
else
echo Skipped downloading $SRC_BINUTILS
fi fi
if [ ! -d ./binutils-2.19_build ]; then if [ ! -e ./$SRC_BINUTILS ]; then
mkdir -p binutils-2.19_build echo Unpacking $SRC_BINUTILS
cd binutils-2.19_build tar -xjf $SRC_BINUTILS.tar.bz2 || exit 1
../binutils-2.19/configure --target=$TARGET --prefix=$PREFIX else
make echo Skipped unpacking $SRC_BINUTILS
make install fi
if [ ! -e ./$SRC_BINUTILS-build ]; then
echo Building $SRC_BINUTILS
mkdir -p $SRC_BINUTILS-build
cd $SRC_BINUTILS-build
../$SRC_BINUTILS/configure --target=$TARGET --prefix=$PREFIX || exit 1
make || exit 1
make install || exit 1
cd .. cd ..
else else
echo binutils is already built. echo $SRC_BINUTILS is already built.
fi fi
# --------------------------------------------------------------- # ---------------------------------------------------------------
# 2. GCC & newlib bauen und installieren # 2. GMP bauen und installieren
# --------------------------------------------------------------- # ---------------------------------------------------------------
if [ ! -d ./newlib-1.16.0 ]; then if [ ! -e $SRC_GMP.tar.bz2 ]; then
tar -xzf newlib-1.16.0.tar.gz echo Downloading $SRC_GMP
wget http://ftp.sunet.se/pub/gnu/gmp/$SRC_GMP.tar.bz2 || exit 1
else
echo Skipped downloading $SRC_GMP
fi fi
if [ ! -d ./gcc-4.3.2 ]; then if [ ! -e ./$SRC_GMP ]; then
tar -xjf gcc-4.3.2.tar.bz2 echo Unpacking $SRC_GMP
cd ./gcc-4.3.2 tar -xjf $SRC_GMP.tar.bz2 || exit 1
ln -sf ../newlib-1.16.0/newlib/ . else
cd .. echo Skipped unpacking $SRC_GMP
fi fi
if [ ! -d ./gcc-4.3.2_build ]; then if [ ! -e ./$SRC_GMP-build ]; then
mkdir -p gcc-4.3.2_build echo Building $SRC_GMP
cd gcc-4.3.2_build mkdir -p $SRC_GMP-build
../gcc-4.3.2/configure --target=$TARGET --prefix=$PREFIX --with-float=soft --with-newlib --verbose --enable-languages="c,c++" cd $SRC_GMP-build
make all ../$SRC_GMP/configure --prefix=$PREFIX || exit 1
make info make || exit 1
make install make check || exit 1
make install || exit 1
cd .. cd ..
else else
echo GCC is already built. echo $SRC_GMP is already built.
fi
# ---------------------------------------------------------------
# 3. MPFR bauen und installieren
# ---------------------------------------------------------------
if [ ! -e $SRC_MPFR.tar.bz2 ]; then
echo Downloading $SRC_MPFR
wget http://www.mpfr.org/mpfr-current/$SRC_MPFR.tar.bz2 || exit 1
else
echo Skipped downloading $SRC_MPFR
fi
if [ ! -e ./$SRC_MPFR ]; then
echo Unpacking $SRC_MPFR
tar -xjf $SRC_MPFR.tar.bz2 || exit 1
else
echo Skipped unpacking $SRC_MPFR
fi
if [ ! -e ./$SRC_MPFR-build ]; then
echo Building $SRC_MPFR
mkdir -p $SRC_MPFR-build
cd $SRC_MPFR-build
../$SRC_MPFR/configure --prefix=$PREFIX || exit 1
make || exit 1
make check || exit 1
make install || exit 1
cd ..
else
echo $SRC_MPFR is already built.
fi
# ---------------------------------------------------------------
# 4. GCC & newlib bauen und installieren
# ---------------------------------------------------------------
if [ ! -e $SRC_NEWLIB.tar.gz ]; then
echo Downloading $SRC_NEWLIB
wget ftp://sources.redhat.com/pub/newlib/$SRC_NEWLIB.tar.gz || exit 1
else
echo Skipped downloading $SRC_NEWLIB
fi
if [ ! -e ./$SRC_NEWLIB ]; then
echo Unpacking $SRC_NEWLIB
tar -xzf $SRC_NEWLIB.tar.gz || exit 1
if [ -e $SRC_NEWLIB-jens.patch ]; then
echo Patching $SRC_NEWLIB
patch -p0 < $SRC_NEWLIB-jens.patch || exit 1
fi
else
echo Skipped unpacking $SRC_NEWLIB
fi
if [ ! -e $SRC_GCC.tar.bz2 ]; then
echo Downloading $SRC_GCC
wget ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.gnu.org/gcc/$SRC_GCC/$SRC_GCC.tar.bz2 || exit 1
else
echo Skipped downloading $SRC_GCC
fi
if [ ! -e ./$SRC_GCC ]; then
echo Unpacking $SRC_GCC
tar -xjf $SRC_GCC.tar.bz2 || exit 1
cd ./$SRC_GCC
ln -sf ../$SRC_NEWLIB/newlib/ .
cd ..
else
echo Skipped unpacking $SRC_GCC
fi
if [ ! -e ./$SRC_GCC-build ]; then
echo Building $SRC_GCC
mkdir -p $SRC_GCC-build
cd $SRC_GCC-build
../$SRC_GCC/configure --target=$TARGET --prefix=$PREFIX --with-float=soft --with-newlib --verbose --enable-languages="c,c++" || exit 1
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PREFIX/lib make all || exit 1
make info || exit 1
make install || exit 1
cd ..
echo $PREFIX/lib >/etc/ld.so.conf.d/local.conf
ldconfig
else
echo $SRC_GCC is already built.
fi fi