[[mips_cross_compiler]]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
mips_cross_compiler [2014/02/14 23:49]
beckmanf added test section
mips_cross_compiler [2014/02/16 01:25]
beckmanf [MIPS Cross Compiler build] changed script
Line 78: Line 78:
 # -e => exit on error # -e => exit on error
 # -v => verbose output # -v => verbose output
- 
-# YOU MUST APPEND THAT to your .profile file 
-# export PATH=$HOME/​site/​bin:​$PATH 
  
 # Mips Cross Compiler # Mips Cross Compiler
Line 93: Line 90:
 mkdir -p mips/orig mkdir -p mips/orig
  
-# Set the destination ​directory +# Set the destination 
-export MYMIPS=$HOME/site+export MYMIPS=/home/fritz/site
  
 # Versions # Versions
-GMPVERSION=4.3.2+GMPVERSION="4.3.2"
 PPLVERSION="​0.12.1"​ PPLVERSION="​0.12.1"​
-BINUTILSVERSION="​2.23.2"+BINUTILSVERSION="​2.24"
 MPFRVERSION="​2.4.2"​ MPFRVERSION="​2.4.2"​
-MPCVERSION="​1.0.1+MPCVERSION="​1.0.2
-ISLVERSION="​0.11.1+ISLVERSION="​0.12.2
-CLOOGVERSION="​0.18.0+CLOOGVERSION="​0.18.1
-GCCVERSION="​4.8.0"+GCCVERSION="​4.8.2"
 NEWLIBVERSION="​1.20.0"​ NEWLIBVERSION="​1.20.0"​
 GDBVERSION="​7.5.1"​ GDBVERSION="​7.5.1"​
 +
 +
 +########################################​
 +# Binutils
 +########################################​
  
 # Get the archives # Get the archives
 cd mips/​orig ​ cd mips/​orig ​
-if [ ! -e "gmp-4.3.2.tar.bz2"​ ] ; then +if [ ! -e "binutils-${BINUTILSVERSION}.tar.bz2"​ ] ; then 
-  wget http://ftp.halifax.rwth-aachen.de/gnu/gmp/gmp-4.3.2.tar.bz2+  wget http://ftp.gnu.org/gnu/binutils/binutils-${BINUTILSVERSION}.tar.bz2
 fi fi
  
 # Unpack to source directory # Unpack to source directory
 cd ../src cd ../src
-if [ ! -d "gmp-4.3.2" ] ; then +if [ ! -d "binutils-${BINUTILSVERSION}" ] ; then 
-tar -xjvf ../orig/gmp-4.3.2.tar.bz2+tar -xvjf ../orig/binutils-${BINUTILSVERSION}.tar.bz2
 fi  fi 
  
-# Build 
 cd ../build cd ../build
-mkdir -p gmp +mkdir -p binutils 
-cd gmp +cd binutils 
-if [ ! -e "​config.status"​ ] ; then  +if [ ! -e "​config.status"​ ] ; then 
-../../src/gmp-4.3.2/configure --prefix=$MYMIPS ​--enable-cxx+../../src/binutils-${BINUTILSVERSION}/configure --target=mipsel-none-elf \ 
 +--prefix=$MYMIPS
 fi fi
-if [ ! -e "​${MYMIPS}/​lib/libgmp.a" ] ; then+ 
 +if [ ! -e "​${MYMIPS}/​bin/mipsel-none-elf-ld" ] ; then
 make make
 make install make install
Line 133: Line 136:
 cd ../../.. cd ../../..
  
 +########################################​
 +# GMP
 +########################################​
  
 # Get the archives # Get the archives
 cd mips/​orig ​ cd mips/​orig ​
-if [ ! -e "ppl-${PPLVERSION}.tar.bz2"​ ] ; then +if [ ! -e "gmp-${GMPVERSION}.tar.bz2"​ ] ; then 
-  wget ftp://ftp.cs.unipr.it/pub/ppl/releases/​${PPLVERSION}/​ppl-${PPLVERSION}.tar.bz2+  wget ftp://ftp.halifax.rwth-aachen.de/gnu/gmp/gmp-4.3.2.tar.bz2
 fi fi
  
 # Unpack to source directory # Unpack to source directory
 cd ../src cd ../src
-if [ ! -d "ppl-${PPLVERSION}" ] ; then +if [ ! -d "gmp-${GMPVERSION}" ] ; then 
-tar -xjvf ../orig/ppl-${PPLVERSION}.tar.bz2+tar -xjvf ../orig/gmp-${GMPVERSION}.tar.bz2
 fi  fi 
  
 +# Build
 cd ../build cd ../build
-mkdir -p ppl +mkdir -p gmp 
-cd ppl +cd gmp 
-if [ ! -e "​config.status"​ ] ; then +if [ ! -e "​config.status"​ ] ; then  
-../../src/ppl-${PPLVERSION}/configure --prefix=$MYMIPS --with-gmp=$MYMIPS --with-sysroot=$MYMIPS+../../src/gmp-${GMPVERSION}/configure --prefix=$MYMIPS --enable-cxx
 fi fi
-if [ ! -e "​${MYMIPS}/​lib/​libppl.a" ] ; then +if [ ! -e "​${MYMIPS}/​lib/​libgmp.a" ] ; then 
-make +make
 make install make install
 fi fi
 cd ../../.. cd ../../..
 +
  
 ########################################​ ########################################​
-Binutils+PPL
 ########################################​ ########################################​
  
 # Get the archives # Get the archives
-cd mips/orig  +#cd mips/orig  
-if [ ! -e "binutils-${BINUTILSVERSION}.tar.bz2"​ ] ; then +#if [ ! -e "ppl-${PPLVERSION}.tar.bz2"​ ] ; then 
-  wget http://ftp.gnu.org/gnu/binutils/binutils-${BINUTILSVERSION}.tar.bz2 + ​wget ​ftp://ftp.cs.unipr.it/pub/ppl/​releases/​${PPLVERSION}/ppl-${PPLVERSION}.tar.bz2 
-fi+#fi
  
 # Unpack to source directory # Unpack to source directory
-cd ../src +#cd ../src 
-if [ ! -d "binutils-${BINUTILSVERSION}" ] ; then +#if [ ! -d "ppl-${PPLVERSION}" ] ; then 
-tar -xvjf ../orig/binutils-${BINUTILSVERSION}.tar.bz2 +#tar -xjvf ../orig/ppl-${PPLVERSION}.tar.bz2 
-fi +#fi 
  
-cd ../build +#cd ../build 
-mkdir -p binutils +#mkdir -p ppl 
-cd binutils +#cd ppl 
-if [ ! -e "​config.status"​ ] ; then +#if [ ! -e "​config.status"​ ] ; then 
-../../src/binutils-${BINUTILSVERSION}/configure --target=mipsel-none-elf \ +#../../src/ppl-${PPLVERSION}/configure --prefix=$MYMIPS ​--with-gmp=$MYMIPS --with-sysroot=$MYMIPS 
---prefix=$MYMIPS ​+#fi 
---with-ppl=$MYMIPS ​  +#if [ ! -e "​${MYMIPS}/​lib/​libppl.a"​ ] ; then 
-fi+#make  
 +#make install 
 +#fi 
 +#cd ../../..
  
-if [ ! -e "​${MYMIPS}/​bin/​mipsel-none-elf-ld"​ ] ; then 
-make 
-make install 
-fi 
-cd ../../.. 
  
 ######################################​ ######################################​
Line 196: Line 202:
 cd mips/​orig ​ cd mips/​orig ​
 if [ ! -e "​mpfr-${MPFRVERSION}.tar.bz2"​ ] ; then if [ ! -e "​mpfr-${MPFRVERSION}.tar.bz2"​ ] ; then
-  wget http://​ftp.halifax.rwth-aachen.de/​gnu/​mpfr/​mpfr-${MPFRVERSION}.tar.bz2+  wget ftp://​ftp.halifax.rwth-aachen.de/​gnu/​mpfr/​mpfr-${MPFRVERSION}.tar.bz2
 fi fi
  
Line 225: Line 231:
 cd mips/​orig ​ cd mips/​orig ​
 if [ ! -e "​mpc-${MPCVERSION}.tar.gz"​ ] ; then if [ ! -e "​mpc-${MPCVERSION}.tar.gz"​ ] ; then
-  wget http://​ftp.halifax.rwth-aachen.de/​gnu/​mpc/​mpc-${MPCVERSION}.tar.gz+  wget ftp://​ftp.halifax.rwth-aachen.de/​gnu/​mpc/​mpc-${MPCVERSION}.tar.gz
 fi fi
  
Line 300: Line 306:
 cd cloog cd cloog
 if [ ! -e "​config.status"​ ] ; then if [ ! -e "​config.status"​ ] ; then
-../​../​src/​cloog-${CLOOGVERSION}/​configure --prefix=$MYMIPS ​+../​../​src/​cloog-${CLOOGVERSION}/​configure --prefix=$MYMIPS --with-gmp-prefix=$MYMIPS --with-isl=system --with-isl-prefix=$MYMIPS
---with-gmp-prefix=$MYMIPS ​+
---with-isl=system ​+
---with-isl-prefix=$MYMIPS+
 fi fi
  
Line 311: Line 314:
 fi fi
 cd ../​../​.. ​ cd ../​../​.. ​
 +
  
 ########################################​ ########################################​
Line 338: Line 342:
 cd mips/​orig ​ cd mips/​orig ​
 if [ ! -e "​gcc-${GCCVERSION}.tar.bz2"​ ] ; then if [ ! -e "​gcc-${GCCVERSION}.tar.bz2"​ ] ; then
-  wget http://​ftp.halifax.rwth-aachen.de/​gnu/​gcc/​gcc-${GCCVERSION}/​gcc-${GCCVERSION}.tar.bz2+  wget ftp://​ftp.halifax.rwth-aachen.de/​gnu/​gcc/​gcc-${GCCVERSION}/​gcc-${GCCVERSION}.tar.bz2
 fi fi
  
Line 423: Line 427:
 cd mips/​orig ​ cd mips/​orig ​
 if [ ! -e "​gdb-${GDBVERSION}.tar.bz2"​ ] ; then if [ ! -e "​gdb-${GDBVERSION}.tar.bz2"​ ] ; then
-  wget http://​ftp.halifax.rwth-aachen.de/​gnu/​gdb/​gdb-${GDBVERSION}.tar.bz2+  wget ftp://​ftp.halifax.rwth-aachen.de/​gnu/​gdb/​gdb-${GDBVERSION}.tar.bz2
 fi fi
  
Line 437: Line 441:
 if [ ! -e "​config.status"​ ] ; then if [ ! -e "​config.status"​ ] ; then
 ../​../​src/​gdb-${GDBVERSION}/​configure --target=mipsel-none-elf ​ \ ../​../​src/​gdb-${GDBVERSION}/​configure --target=mipsel-none-elf ​ \
 +--enable-sim-trace \
 --enable-sim-stdio \ --enable-sim-stdio \
 --prefix=$MYMIPS ​ --prefix=$MYMIPS ​
Line 446: Line 451:
 fi fi
 cd ../../.. cd ../../..
- 
  
 </​code>​ </​code>​
  • mips_cross_compiler.txt
  • Last modified: 2014/06/04 17:52
  • by beckmanf