- updated to latest versions
- added MPC - GCC: fixed path to GMP, MPFR git-svn-id: http://moon:8086/svn/mips@3 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
+46
-12
@@ -1,15 +1,16 @@
|
||||
#!/bin/sh
|
||||
TARGET=mipsel-elf
|
||||
PREFIX=/usr/local
|
||||
PREFIX=$(pwd)/install
|
||||
|
||||
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
|
||||
SRC_BINUTILS=binutils-2.24
|
||||
SRC_GCC=gcc-4.8.3
|
||||
SRC_NEWLIB=newlib-1.20.0
|
||||
SRC_GMP=gmp-4.3.2
|
||||
SRC_MPFR=mpfr-3.1.2
|
||||
SRC_MPC=mpc-1.0.1
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# 1. Binutils bauen und installieren
|
||||
# 10. Binutils bauen und installieren
|
||||
# ---------------------------------------------------------------
|
||||
if [ ! -e $SRC_BINUTILS.tar.bz2 ]; then
|
||||
echo Downloading $SRC_BINUTILS
|
||||
@@ -38,7 +39,7 @@ else
|
||||
fi
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# 2. GMP bauen und installieren
|
||||
# 20. GMP bauen und installieren
|
||||
# ---------------------------------------------------------------
|
||||
if [ ! -e $SRC_GMP.tar.bz2 ]; then
|
||||
echo Downloading $SRC_GMP
|
||||
@@ -68,7 +69,7 @@ else
|
||||
fi
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# 3. MPFR bauen und installieren
|
||||
# 30. MPFR bauen und installieren
|
||||
# ---------------------------------------------------------------
|
||||
if [ ! -e $SRC_MPFR.tar.bz2 ]; then
|
||||
echo Downloading $SRC_MPFR
|
||||
@@ -88,7 +89,7 @@ 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
|
||||
../$SRC_MPFR/configure --prefix=$PREFIX --with-gmp=$PREFIX || exit 1
|
||||
make || exit 1
|
||||
make check || exit 1
|
||||
make install || exit 1
|
||||
@@ -98,7 +99,37 @@ else
|
||||
fi
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# 4. GCC & newlib bauen und installieren
|
||||
# 31. MPC bauen und installieren
|
||||
# ---------------------------------------------------------------
|
||||
if [ ! -e $SRC_MPC.tar.gz ]; then
|
||||
echo Downloading $SRC_MPC
|
||||
wget ftp://ftp.gnu.org/gnu/mpc/$SRC_MPC.tar.gz || exit 1
|
||||
else
|
||||
echo Skipped downloading $SRC_MPC
|
||||
fi
|
||||
|
||||
if [ ! -e ./$SRC_MPC ]; then
|
||||
echo Unpacking $SRC_MPC
|
||||
tar -xzf $SRC_MPC.tar.gz || exit 1
|
||||
else
|
||||
echo Skipped unpacking $SRC_MPC
|
||||
fi
|
||||
|
||||
if [ ! -e ./$SRC_MPC-build ]; then
|
||||
echo Building $SRC_MPC
|
||||
mkdir -p $SRC_MPC-build
|
||||
cd $SRC_MPC-build
|
||||
../$SRC_MPC/configure --prefix=$PREFIX --with-gmp=$PREFIX --with-mpfr=$PREFIX || exit 1
|
||||
make || exit 1
|
||||
make check || exit 1
|
||||
make install || exit 1
|
||||
cd ..
|
||||
else
|
||||
echo $SRC_MPC is already built.
|
||||
fi
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# 40. GCC & newlib bauen und installieren
|
||||
# ---------------------------------------------------------------
|
||||
if [ ! -e $SRC_NEWLIB.tar.gz ]; then
|
||||
echo Downloading $SRC_NEWLIB
|
||||
@@ -139,7 +170,7 @@ 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
|
||||
../$SRC_GCC/configure --target=$TARGET --prefix=$PREFIX --with-gmp=$PREFIX --with-mpfr=$PREFIX --with-mpc=$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
|
||||
@@ -149,3 +180,6 @@ if [ ! -e ./$SRC_GCC-build ]; then
|
||||
else
|
||||
echo $SRC_GCC is already built.
|
||||
fi
|
||||
|
||||
echo Finished building toolchain.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user