[fpc-pascal] Best start point for adding new FPC target
Karoly Balogh (Charlie/SGR)
charlie at scenergy.dfmk.hu
Tue Jan 28 21:39:16 CET 2020
Hi,
On Tue, 28 Jan 2020, Fabio Luis Girardi via fpc-pascal wrote:
> I was thinking of starting with armhf-netbsd, that can I supposeĀ to be
> the closest to the armhf-freebsd target. I'm right? Someone experienced
> adding new targets for FPC has another suggestion?
Well, you don't need to clone the entire RTL for just porting the thing to
a different CPU architecture, if the OS support is already there, so I
wouldn't follow that advice. And I'd just extend the existing FreeBSD RTL
and for that, I could use the NetBSD one. They're heavily overlap anyway.
However, you need to add the new target it to the build system, and the
compiler, which is quite complicated, as a system ID and various
properties have to be added to quite a few places (compiler,
/systems/t_bsd.pas, systems.pas, ppudump, FPMake and FPCMake, then
regenerate all the Makefiles...) So it's quite an undertaking, not really
feasible for submitting a simple patch. However, if you want I can assist
in that part, so you can just iterate on the RTL, by having a working
compiler already.
BTW the NetBSD/ARMHF port (by me, if I'm correct), was never really
working fully, because I was too lazy to figure out some things, like the
usual "always broken on BSD" differences in the stat structure, and how
some syscalls have changed.
But maybe it's a time to figure out what's up with that. I still have the
required NetBSD setup for that anyway.
Charlie
More information about the fpc-pascal
mailing list