[fpc-devel] Building compiler, rtl, host, target... (cross compiling)

Skybuck Flying skybuck2000 at hotmail.com
Thu Apr 7 09:37:43 CEST 2011


I have to go do other things now so I will keep this short, maybe I'll get 
back to this posting later on...

>> What is needed is a "full-cross compiler" which also uses the NewRTL for 
>> the NewPlatform.
>
> No, why should the compiler need to use a different RTL, for its *own* 
> operation?

It already has an RTL embedded inside it which it is currently using to run 
itself.

(Side question: can an RTL actually be a runtime library instead of being 
compiled into applications ?)

However for the application which it is trying to compile needs to run on a 
different platform and thus
the application needs to either be linked to that platform RTL or it needs 
to have that platform RTL embedded into it.

And that's what free pascal more or less seems to do... it embeds "a target 
platform RTL" into the application that it tries to compile.

> Every compiler can compile the RTL for its target, as well as other 
> applications.

No the compiler cannot compile the RTL for it's target because the compiler 
does not have
the assembly yet to output the RTL ?

So at the very minimum the compiler needs to produce assembler output and 
for that it needs
some kind of internal assembler-outputter ;)

An alternative could be a plug-in system where the necessary 
assembler-outputter is plugged into.

But currently free pascal works with "embedded assembler-outputters" thus 
the compiler needs to be re-compiled
before it can use these new "assembler outputters".

(Ok, you had no further comments, so this can probably be kept short ;))

Bye,
  Skybuck.




More information about the fpc-devel mailing list