Cross compiler
If compiler run on one machine and produces object code for
other machine then such compiler is called as cross compiler.
Bootstrapping
- Bootstrapping
is widely used in the compilation development.
- Bootstrapping
is used to produce a self-hosting compiler. Self-hosting compiler is a
type of compiler that can compile its own source code.
- Bootstrap
compiler is used to compile the compiler and then you can use this
compiled compiler to compile everything else as well as future versions of
itself.
A compiler can be characterized by three languages:
- Source
Language
- Target
Language
- Implementation
Language
The T- diagram shows a compiler SCIT for
Source S, Target T, implemented in I.
Follow some steps to produce a new language L for machine A:
1. Create a compiler SCAA for
subset, S of the desired language, L using language "A" and that
compiler runs on machine A.
2. Create a compiler LCSA for language L written in a subset of L.
3. Compile LCSA using the compiler SCAA to obtain LCAA. LCAA is a compiler for language L, which runs on machine A and produces code for machine A.
The process described by the T-diagrams is
called bootstrapping.