Computer Science, asked by morthriyasr4772, 11 months ago

What is cross compiler,explain bootstrapping compiler?

Answers

Answered by vishveshmodcoipbsqzf
0

A cross-compiler is a compiler that runs on one machine and produces object code for another machine.

Suppose we have a new language, L, that we want to make available on machines A and B. As a first step, we can write a small compiler: SCAA, which will translate an S subset of L to the object code for machine A, written in a language available on A. We then write a compiler SCSA, which is compiled in language L and generates object code written in an S subset of L for machine A. But this will not be able to execute unless and until it is translated by SCAA; therefore, SCSA is an input into SCAA, as shown below, producing a compiler for L that will run on machine A and self-generate code for machine A: SCAA.

Now, if we want to produce another compiler to run on and produce code for machine B, the compiler can be written, itself, in L and made available on machine B

Hope It Helps You....

Similar questions