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

Marc Santhoff M.Santhoff at web.de
Thu Nov 9 22:56:54 CET 2017

On Do, 2017-11-09 at 21:31 +0100, Giuliano Colla wrote:
> Il 09/11/2017 02:36, Marc Santhoff ha scritto:
> > how does fpc and it's makefiles handle the case of installing a cross
> > compiler on a system having fpc installed?
> >
> > The target path will differ and I can set that, but how is the config
> > file .fpc.cfg handled?
> You may edit your fpc.cfg for your different target using an IFDEF/ENDIF 
> pair.
> Under Linux I have in my home directory a .fpc.cfg sort of:
> #include /etc/fpc.cfg  <--- to get all the defaults
> ---- here all the ARM specific paths and options

I see, so when using fpc for ARM these define is automatically set?
And would that be CPUAVR for Atmels chips?

> That's the basic idea. All that's between #IFDEF -- #ENDIF is ignored 
> when you're *not* cross-compiling.
> All that's between #IFDEF -- #ENDIF overrides the previous settings when 
> you're cross-compiling

I have thought about this solution, but did not know the details. Next
step will be to generate a default fpc.cfg for the arm cross compiler
and merge that into the .fpc.cfg using ifdefs.

Fine, now I know the way. :)


More information about the fpc-pascal mailing list