Building Nachos Executables with a Cross-Compiler
A cross-compiler is a compiler that runs on one architecture but compiles to another architecture, e.g. a compiler that runs on x86 Solaris machines such as torus.cs but builds MIPS programs. You will be making extensive use of MIPS cross-compilers this semester, unless you actually run Nachos on a MIPS machine.
When you run gmake in the test directory, gmake will look for a cross-compiler in the directory pointed at by the ARCHDIR environment variable. If you are using an instructional machine of one of the architectures we support (HP machines, DEC Alpha machines, or x86 Solaris machines), then this is automatic.
If you are not using an instructional machine, you will need to
- download the necessary cross-compiler, and
- set the ARCHDIR environment variable to point at the cross-compiler directory.