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 (x86 Solaris, Solaris SPARC, and Linux machines), then this is automatic. You might find these helpful:

If you are not using an instructional machine, you will need to

We provide a fair collection of cross-compilers, so most likely you will not have to build one of your own:

If you do need to build your own cross-compiler, instruction to do so are here.