[fpc-devel] patch for rtl/linux/aarch64/cprt0.as

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Oct 6 08:47:43 CEST 2015

Edmund Grimley Evans wrote on Tue, 06 Oct 2015:

> Clearly I don't really know what I'm doing with these start-up
> files... but I found I needed this patch to build the Debian package
> on arm64, so it's probably something for the AArch64 fixes branch.

As Sergei mentioned, this is definitely not the right approach. The  
difficulty with finding these files automatically is that they're  
often in non-standard locations. Normally, fpcmkcfg  
(utils/fpcmkcfg/fpcmkcfg.pp, executed to create /etc/fpc.cfg) will ask  
GCC for the path to these object files by extracting the path from the  
output of "gcc --print-libgcc-file-name". It will then prepend -Fl to  
that path and add the result to fpc.cfg

Now, for some reason, it seems that right now on Linux we only do this  
for x86 and PowerPC (32 and 64 bit). It seems there's an "else result  
:= '-Fl'+GetDefaultLibGCCDir(CPU, OS, S);" missing for Linux. That  
would explain why you have those problems on AArch64, but not for  
PowerPC. Unless those machines don't have the libc-devel package  
installed, or no gcc when the system fpc was installed? (although  
that's hard to imagine)


More information about the fpc-devel mailing list