So, I had a quick look at FPC yesterday, since you'd mentioned it earlier.
The current main-tree FPC ebuild on Gentoo doesn't support aarch64/arm64 at the moment. To write a tweaked one that will work, I'd need an aarch64-linux binary
FPC package for the bootstrapping phase of the build (as modern FPC seems to need FPC to build it, essentially, much as rust needs rust to build), or detailed cross-compile instructions.
To be more specific: currently, the 3.0.4 ebuild downloads the generic FPC build and source packages from sourceforge, and then an arch-specific binary package, also from sourceforge. So on a 64-bit Linux PC, for example, it would download (from prefix https://sourceforge.net/projects/freepascal/files/
- Source/3.0.4/fpcbuild-3.0.4.tar.gz/download (OK for all arches)
- Source/3.0.4/fpc-3.0.4.source.tar.gz/download (OK for all arches)
- Linux/3.0.4/fpc-3.0.4.x86_64-linux.tar/download (for bootstrapping on 64-bit linux PCs only)
Where (3) is the binary package used during bootstrapping (the precompiled/binary FPC compiler therein is used to compile the FPC sources, and the resulting FPC compiler is then used to compile the FPC sources again).
Accordingly, to build on aarch64-linux rather than x86_64, I'd either need an equivalent binary package to (3) for aarch64-linux (which I can't see on sourceforge at a quick glance, although it's entirely possible I've missed it!), or some detailed cross-compilation instructions from x86_64-linux to aarch64-linux (as I don't use FPC day-to-day).
So, if you could point me to either or both of the above, I'd be happy to write the ebuild for FPC. And once FPC is available, we can look at Lazarus.