Now, we're ready to compile our cross compiler, linker and bootstrap compiler.
The first step is the build of the binutils-2.11.2
. This package contains programs
for archiving (ar), archive indexing (ranlib) and much more essential:
$ cd ../.. $ cd BUILD $ tar -xvzf ../SRC/binutils-2.11.2.tar.gz -C . $ patch -p0 < ../SRC/binutils-2.11.2-sh-linux.diff $ mkdir build-binutils $ cd build-binutils $ ../binutils-2.11.2/configure --target=$TARGET \ --prefix=$PREFIX $ make all install $ cd ..
Following, we're able to build the GNU Compiler Collection:
$ tar -xvzf ../SRC/gcc-3.0.1.tar.gz -C . $ patch -p0 < ../SRC/gcc-3.0.1-sh-linux.diff $ mkdir build-gcc $ cd build-gcc $ ../gcc-3.0.1/configure --target=$TARGET \ --prefix=$PREFIX --without-headers \ --with-newlib --disable-shared \ --enable-languages=c $ make all-gcc install-gcc $ cd ..
The configure - script configures this package for the SEGA Dreamcast
only with the specified (only the C language) compiler and their runtime
libraries, --without-headers
prohibits the use of cross compiler header
files (they actually don't exist!) and the use of the newlib C - library as the
target C - library. This library will be replaced by uClibc in a later stage.