A cross compiler is a compiler that is hosted on one platform (machine type and operating system) that targets (produces output for) another platform.

Cross compilers are very popular for embedded development, where the target probably couldn't run a compiler. Typically an embedded platform has restricted RAM, no hard disk, and limited I/O capability. Code can be edited and compiled on a fast host machine (such as a PC or Unix workstation) and the resulting executable code can then be downloaded to the target to be tested. Cross compilers are beneficial whenever the host machine has more resources (memory, disk, I/O, etc.) than the target.

GCC, the GNU Compiler Collection, can be built as a cross compiler, and supports a huge number of host and target combinations. It supports as a target everything from 64 bit Unix boxes down to 8 bit microcontrollers like Atmel's AVR and Motorola's MC68HC11.

Log in or register to write something here or to contact authors.