Cross-compiler

From Computer History Wiki
Revision as of 22:33, 27 June 2024 by Jnc (talk | contribs) (+sometimes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A cross-compiler is a compiler which runs on one type of CPU, but creates object code for a different type of CPU. A cross-assembler is similar - an assembler which produces object code for a different type of machine.

Cross-compilers and cross-assemblers have a variety of uses: bringing up an operating system on a new machine, or creating code for a system (e.g. an embedded processor) on which it is not intended to host a software development environment, etc, etc.

It is of course possible to cross-compile a cross-compiler. In the general case, this involves three types of CPUs: the build machine is doing the cross-compilation, the host machine is for running the new cross-compiler, which creates object code for the target machine. This technique is sometimes called Canadian cross-compilation.