Building a development environment

Our standard development environment consists of two machines, a development workstation and a testbed machine. The workstation needs to be a unix variant which is able to compile gnu binutils and gcc. The testbed needs to be a 386 with at least 2 megs of ram an a network and video card.

Setting up the Workstation

Building the cross compiler

To build a cross compiling suite you need the following packages from you nearest gnu archive:

Compiling

binutils
First compile binutils for the i386-unknown-gnu target. You will likely want to specify an install prefix like /usr/local/xdev as to not dirty the rest of you machine.
silverbolt_18# gnzip -c binutils-2.7.tar.gz | tar -xf -
silverbolt_19# cd binutils-2.7/
silverbolt_20# ./configure --target=i386-unknown-gnu --prefix=/usr/local/xdev

configure runs

silverbolt_21# make

make runs

silverbolt_23# make install 

make runs
gcc
Next compile gcc for the i386-unknown-gnu target. Only compile the c and c++ compilers. The objective c compiler need runtime library which is OS specific.
silverbolt_27# gunzip -c gcc-2.7.2.3.tar.gz | tar -xf -
silverbolt_28# cd  gcc-2.7.2.3/
silverbolt_29# ./configure --target=i386-unknown-gnu --prefix=/usr/local/xdev

configure runs

silverbolt_30# make LANGUAGES="c c++" LIBGCC=/dev/null

make runs

silverbolt_31# /usr/local/xdev/386-unknown-gnu/bin/ar rc libgcc2.a
silverbolt_32# make LANGUAGES="c c++" LIBGCC=/dev/null install

make runs