[fpc-pascal] installing cross fpc in parallel to systems fpc

Marco van de Voort marcov at stack.nl
Fri Nov 10 10:12:07 CET 2017


In our previous episode, Marc Santhoff said:
> > #ENDIF
> 
> I see, so when using fpc for ARM these define is automatically set?
> And would that be CPUAVR for Atmels chips?

(easiest is to just fpc -va some dummy source and then grep for CPU, or look
in the compiler sources (options.pas or systems/ iirc)

You can select a different cpu then the default using fpc -P<architecture>

So if you have a x86 compiled fpc.exe, you can get it to select ppcx64 using
fpc -Px86_64 and then e.g. -Twin64 for the target.  Then all the relevant
directives (CPU64, cpux86_64, win64, mswindows etc) are defined.

(I use windows now because I know those defines by heart, for arm it is the
same).

The buildfaq (document section on the FPC site), though somewhat outdated,
has some info and examples on this.




More information about the fpc-pascal mailing list