Take the 2-minute tour ×
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It's 100% free, no registration required.

I'm currently learning for an exam about compilers and found the following question:

(3 p.) Bootstrapping: Explain the concepts of rehosting and retargeting. Use T-diagrams.

As far as I understand, rehosting means to compile a compiler for another platform (host), so it should look like this:

-------------
| a       b |     --------------
-----   -----     | a        b |
    | c |-------------    ------
    -----| c       x || x |
         -----   ----------
             | ? |
             -----

Is this correct? And what does retargeting mean?

share|improve this question
add comment

1 Answer

? should be replaced by x, see these lecture notes.

Rehosting: your target machine is fixed and you simply run the compiler to achieve the machine code. Example, a C compiler for intel x86 processor.

Retarget: you want flexibility for your compiler and need to cross-compile it using another compiler and therefore, "Target" it for different machine than which was originally intended for.

(I am feeling a bit strange as this is how I have justified the lecuture to myself :P). For all intents and purposes, I am more than happy to get a slap on the wrist for a wrong answer :

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.