This is an old revision of the document!


Deploy binutils 2.22

  • prepare working area
$ mkdir ~/projects/gcc-mips/
$ cd ~/projects/gcc-mips/
$ mkdir build-binutils-el
  • download and unpack
$ wget http://ftp.gnu.org/gnu/binutils/binutils-2.22.tar.gz -O /tmp/binutils-2.22.tar.gz
$ tar xvpf /tmp/binutils-2.22.tar.gz
  • build and install (all tools will be installed into /opt/mipsel/ directory)
$ cd build-binutils-el
$ ../binutils-2.22/configure --target=mipsel --prefix=/opt/mipsel
$ make
$ sudo make install

Deploy gcc 4.5.2 with newlib 1.20.0

  • prepare working area
$ cd ~/projects/gcc-mips/
$ mkdir build-gcc-el
$ mkdir build-newlib-el
  • download and unpack
$ wget http://ftp.gnu.org/gnu/gcc/gcc-4.5.2/gcc-4.5.2.tar.gz /tmp/gcc-4.5.2.tar.gz
$ tar xvpf /tmp/gcc-4.5.2.tar.gz
$ wget ftp://sources.redhat.com/pub/newlib/newlib-1.20.0.tar.gz -O /tmp/newlib-1.20.0.tar.gz
$ tar xvpf /tmp/newlib-1.20.0.tar.gz
  • build and install (tools will be installed into /opt/mipsel/ directory). Building gcc with newlib is done in three steps.

Stage 1 - build bootstrap gcc

$ cd build-gcc-el
$ ../gcc-4.5.2/configure --target=mipsel --prefix=/opt/mipsel --with-gmp-include=/usr/include/gmp --with-mpfr-include=/usr/include/mpfr --without-headers --with-gnu-as --with-gnu-ld --with-newlib --enable-languages=c --with-local-prefix=/opt/mipsel --with-native-system-header-dir=/opt/mipsel/include/ --disable-nls --disable-shared  --enable-multilib --disable-decimal-float -disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath
$ make
$ sudo make install
  • –enable-multilib - builds several variants of libraries (big-endian, little-endian hard-float and soft-float). Default is little-endian hard-float.
$ /opt/mipsel/bin/mipsel-gcc -print-multi-lib
.;
soft-float;@msoft-float
eb;@EB
soft-float/eb;@msoft-float@EB
$

Stage 2 - deploy newlib

  • build and install
$ cd ~/projects/gcc-mips/build-newlib-el
$ ../newlib-1.20.0/configure --target=mipsel --prefix=/opt/mipsel
$ make
$ sudo make install

Stage 3 - deploy gcc with newlib suport

$ cd ~/projects/gcc-mips/build-gcc-el
$ ../gcc-4.5.2/configure --target=mipsel --prefix=/opt/mipsel --with-gmp-include=/usr/include/gmp --with-mpfr-include=/usr/include/mpfr --with-gnu-as --with-gnu-ld --with-newlib --enable-languages=c --with-local-prefix=/opt/mipsel --with-native-system-header-dir=/opt/mipsel/include --disable-nls --disable-shared  --enable-multilib --disable-decimal-float -disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath
$ make
$ sudo make install
howtos/pic32mx_tools_on_solaris.1359800456.txt.gz · Last modified: 2013/03/20 21:02 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0