- 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
+131 -27
View File
@@ -2,46 +2,150 @@
TARGET=mipsel-elf
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
# ---------------------------------------------------------------
if [ ! -d ./binutils-2.19 ]; then
tar -xjf binutils-2.19.tar.bz2
if [ ! -e $SRC_BINUTILS.tar.bz2 ]; then
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
if [ ! -e ./$SRC_BINUTILS ]; then
echo Unpacking $SRC_BINUTILS
tar -xjf $SRC_BINUTILS.tar.bz2 || exit 1
else
echo Skipped unpacking $SRC_BINUTILS
fi
if [ ! -d ./binutils-2.19_build ]; then
mkdir -p binutils-2.19_build
cd binutils-2.19_build
../binutils-2.19/configure --target=$TARGET --prefix=$PREFIX
make
make install
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 ..
else
echo binutils is already built.
echo $SRC_BINUTILS is already built.
fi
# ---------------------------------------------------------------
# 2. GCC & newlib bauen und installieren
# 2. GMP bauen und installieren
# ---------------------------------------------------------------
if [ ! -d ./newlib-1.16.0 ]; then
tar -xzf newlib-1.16.0.tar.gz
if [ ! -e $SRC_GMP.tar.bz2 ]; then
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
if [ ! -e ./$SRC_GMP ]; then
echo Unpacking $SRC_GMP
tar -xjf $SRC_GMP.tar.bz2 || exit 1
else
echo Skipped unpacking $SRC_GMP
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 --with-float=soft --with-newlib --verbose --enable-languages="c,c++"
make all
make info
make install
if [ ! -e ./$SRC_GMP-build ]; then
echo Building $SRC_GMP
mkdir -p $SRC_GMP-build
cd $SRC_GMP-build
../$SRC_GMP/configure --prefix=$PREFIX || exit 1
make || exit 1
make check || exit 1
make install || exit 1
cd ..
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