These instructions are intended for use with Linux boxes. I have tested them on a departmental Linux box using gcc-3.3.
Now the build directory should contain the following sub-directories:binutils: ftp://ftp.gnu.org/gnu/binutils/binutils-2.11.2.tar.gzgcc: ftp://ftp.gnu.org/gnu/gcc/gcc-2.95.2.tar.gz
binutils-2.11.2/ gcc-2.95.2/
cross/ gcc-obj/
% setenv target decstation-ultrix% setenv host i686-pc-linux-gnu% setenv prefix /apps/nachos_gcc/cross% setenv srcdir /apps/nachos_gcc/gcc-2.95.2% setenv objdir /apps/nachos_gcc/gcc-obj
% configure --host=$host --target=$target --prefix=$prefix -v
% make all installA successful install will generate the following files in $prefix/decstation-ultrix/bin/:
ar as gcc ld nm ranlib strip
% mkdir $prefix/decstation-ultrix/sys-include
% cd $objdir% $srcdir/configure --host=$host \--target=$target \--prefix=$prefix \--program-prefix=cross \--with-gnu-as \--with-gnu-ld \--with-as=$prefix/decstation-ultrix/bin/as \--with-ld=$prefix/decstation-ultrix/bin/ld \--enable-languages=c \--disable-multilib \--disable-libgcj
% makeThis will generate a libgcc2.a error. Since Nachos does not depend on any library, we will just ignore this error and continue with:% make -k installThis will complete the install.
The installed cross compiler will be under /apps/nachos_gcc/cross/decstation-ultrix/bin. Modify the path to the cross compiler in the Makefile of the directory where your Nachos program recide,
and everything is ready to run. Good luck.
2003-09-5 dsn