----- Original Message ----- From: "Hans-Peter Diettrich" <drdiettri...@aol.com>
To: "FPC developers' list" <fpc-devel@lists.freepascal.org>
Sent: Thursday, 7 April, 2011 06:10 AM
Subject: Re: [fpc-devel] Building compiler, rtl, host,target... (cross compiling)


Skybuck Flying schrieb:

First of all "free pascal compiler" is not a "multi-target cross compiler" but it is a "dual-target cross compiler" (dual meaning host and target can be different ;))

FPC is a single target cross compiler. "cross" indicates that the target can be different from the host system.

Perhaps you look at it from the binary level, but that's not fair, you should look at it from the source code level.

Single refers to target.

A zero-target cross compiler would be a cross compiler under development it has the framework to become a cross compiler but it does not yet have any supported targets.

A single-target cross compiler is probably still a cross compiler under development but already has support for a single target.

A dual-target cross compiler has support for two targets.

A 6-target cross compiler has support for six targets.

I would define a target as follows:

Target = harware (cpu) + operating system (assembler + linker + rtl (so that application can hook into basic OS functionality))


To be able to cross compile from one target to another target actually requires two targets.

It requires:

1. A host/local target
2. A guest/remote target


(The source code of the compiler is compiled towards the host target, this requires some sort of host rtl.) (However the source code of the compiler also requires the source code of the guest target/rtl.)

So in a way it needs support for both targets otherwise it will somehow not fully compile or it can't cross compile.

And thus when I say a "dual target cross compiler" this would mean it has support in it's source code for two targets.


The remaining question is: what is free pascal ?

Free pascal I would describe as:

a x-way self-hosting retarded (/brain-dead) (non-portable) cross compiler".

(Perhaps I should even add internal assemblers etc but let's not for now).

x should be replaced by the number of target-sub-folders.

self-hosting refers to the fact that it can compile itself once it's build.

retarded (/brain dead) refers to it's inability to switch targets during runtime. (only one guest-target seems to be selected during the compiler-self-build process).

(non-portable) refers to it's inability of being compiled by other compilers. (For example Delphi can't compile the current state of the free pascal compiler source code)

cross-compile refers to it's ability to cross compile to other targets.

I hope I clearified that a little bit for you ! ;) =D

Bye,
Skybuck.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to