[fpc-devel] rev 19036 breaks the Android cross-compiler

Sven Barth pascaldragon at googlemail.com
Tue Nov 15 19:26:27 CET 2011


On 15.11.2011 14:18, Thomas Schatzl wrote:
> Arm-linux and arm-android are really different in regards to startup,
> and likely not only that. The easiest (and most clean) way to do this in
> a compiler supported way (there is no "OS-variant" notion in the
> compiler to pass custom startup files iirc which would be another way of
> hacking in "support") is to add an explicit arm-android target that
> reuses most of *nix/linux rtl in some way.

There is the ability to use a different startup code. It just works a 
bit complicated, because it works on the type of the detected c-library. 
Especially when cross compiling one needs to be careful. E.g. I myself 
have a glibc i386 system, but cross compile for a uclibc ARM one.
The responsible code is in $fpcdir/compiler/systems/t_linux.pas and 
there TLinkerLinux.InitSysInitUnitName. So in theory it should be 
possible to extend this by a detection for the Android bionic library 
(as the library needs to be available when cross compiling this should 
at least in theory be possible).

Regards,
Sven



More information about the fpc-devel mailing list