Skip to main content.

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

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