Changes between Initial Version and Version 1 of Cross Compiler


Ignore:
Timestamp:
Mar 28, 2007, 2:40:57 PM (17 years ago)
Author:
Nicolas Pouillon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Cross Compiler

    v1 v1  
     1= Get the sources =
     2
     3You will need gnu binutils and gcc. They are available on ftp.gnu.org or any gnu mirror.
     4Let's unpack sources:
     5
     6{{{
     7$ mkdir src
     8$ cd src
     9$ tar xjf ..../binutils-2.xx.tar.bz2
     10$ tar xjf ..../gcc-x.x.x.tar.bz2
     11$
     12}}}
     13
     14== Compilation ==
     15
     16Now lets compile. I assume we'll need to compile more toolchains later, so let's share the sources and compile in a separate directory:
     17
     18{{{
     19$ cd ..
     20$ mkdir build build/mipsel build/mipsel/binutils build/mipsel/gcc
     21}}}
     22First, binutils
     23{{{
     24$ cd build/mipsel/binutils
     25$ ../../../src/binutils-2.x/configure  --prefix=/where/to/put/it --target=mipsel-unknown-elf \
     26  --program-prefix=mipsel-unknown-elf-
     27$ make
     28$ make install
     29$
     30}}}
     31Export the `bin` directory of your installation path, if not already in it.
     32You should make this permanent by setting the PATH variable in a shell's startup script.
     33{{{
     34$ export PATH=$PATH:/where/to/put/it/bin
     35$
     36}}}
     37Now gcc
     38{{{
     39$ cd ../gcc
     40$ ../../../src/gcc-x.x.x/configure  --program-prefix=mipsel-unknown-elf- --prefix=/where/to/put/it \
     41  --enable-languages=c --target=mipsel-unknown-elf --host=i686-pc-linux-gnu
     42$ make
     43$ make install
     44$
     45}}}
     46
     47We're done !