MIPS Cross compiler:
Runs on one architecture but compile program for another architecture.
Cross compiler is used to build Nachos executables. It is needed unless the nachos is run on MIPS machine.
If we are not using instructional machines then
1. need to download the necessary cross compilers
2. set the ARCHDIR environmental variable to point to the cross compiler
3. prepend the PATH environmental variable to point to the cross compiler
When the gmake is run on the test directory gmake looks for cross compiler in the directory pointed by the ARCHDIR environmental variable. The instructional machines(HP, x86 Solaris, DEC alpha) it is done automatically. Linux, Machintos, Windows are not instructional machines.
To do it in linux just copy these two lines in bash.bashrc file in your .bashrc file
export ARCHDIR=/home/mips-x86.linux-xgcc/mips-gcc
export PATH=/home/mips-x86.linux-xgcc/mips-gcc:$PATH
Additional help is in the following link
http://www-cse.ucsd.edu/classes/sp08/cse120/projects/project2.shtml
No comments:
Post a Comment