OpenCores

*Plasma - most MIPS I(TM) opcodes :: Gnu gcc

Linux Tools Build Instructions

Build Scripts

The instructions below are for an older version of GCC. For new versions of GCC see the build scripts under the Bugtracker tab for Idea(s)->gnu toolchain build script.

Download GCC

Download and extract the sources from http://ftp.gnu.org/gnu:
   tar zxvf binutils-2.19.1.tar.gz     //changed from 2.19
   tar zxvf gcc-4.3.2.tar.gz

Download GMP (New versions of GCC need this???)

Download ftp://ftp.gnu.org/gnu/gmp/gmp-4.3.2.tar.gz
   Copy to /usr/local/src and uncompress it there.
   tar zxvf gmp-4.3.2.tar.gz

Download MPFR (Multiple-Precision Floating-point with Rounding)

Download and extract from http://www.mpfr.org/mpfr-current/#download:
   unzip mpfr-2.3.2.zip

Build binutils

Note: To install only for one user, use the red PREFIX below and create the /home/username/gnu_mips/tools directory.
   mkdir build-binutils        
   cd build-binutils
   export TARGET=mips-elf
   export PREFIX=/usr/local/$TARGET
   export PREFIX=/home/username/gnu_mips/tools/$TARGET
   export PATH=$PATH:$PREFIX/bin
   ../binutils-2.19.1/configure --target=$TARGET --prefix=$PREFIX
   make
   make install
   cd ..

Build GMP

   mkdir build-gmp
   cd build-gmp
   ../configure --prefix=$PREFIX
   make
   make check
   make install 

Build MPFR

   mkdir build-mpfr
   cd build-mpfr
   ../mpfr-2.3.2/configure -–target=$TARGET -–prefix=$PREFIX --with-gmp=$PREFIX
   make
   make install
   cd ..

Build GCC

   mkdir build-gcc     
   cd build-gcc     
   ../gcc-4.3.2/configure --with-newlib --without-headers --enable-languages="c" \
      --target=$TARGET --prefix=$PREFIX --with-gnu-ld --with-gnu-as --disable-libssp \
      --with-mpfr=$PREFIX --with-gmp=$PREFIX
   make
   make install
   cd ..
Thanks to ishii AT lex-inc.co.jp for providing updated instructions.

© copyright 1999-2017 OpenCores.org, equivalent to ORSoC AB, all rights reserved. OpenCores®, registered trademark.