$ sudo make crossinstall OS_TARGET=android CPU_TARGET=i386 PP=$localcompiler OPT=-dFPC_USE_LIBC
....
/usr/bin/ppcx64 -Ur -Xs -O2 -n -Fux86_64 -Fusystems -Fu/home/theo/opt/fpc-trunk/rtl/units/x86_64-linux -Fix86_64 -FE. -FUx86_64/units/x86_64-linux -Cg -dRELEASE -dFPC_USE_LIBC -dx86_64 -dGDB -dBROWSERLOG -Fux86 -Sew pp.pas
pp.pas(234,1) Warning: "crtbeginS.o" not found, this will probably cause a linking failure
pp.pas(234,1) Warning: "crtendS.o" not found, this will probably cause a linking failure
/usr/bin/ld: warning: ./link.res contains output sections; did you forget -T?
pp.pas(234,1) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
make[4]: *** [Makefile:4143: ppc] Fehler 1
make[4]: Verzeichnis „/home/theo/opt/fpc-trunk/compiler“ wird verlassen
make[3]: *** [Makefile:4226: cycle] Fehler 2
make[3]: Verzeichnis „/home/theo/opt/fpc-trunk/compiler“ wird verlassen
make[2]: *** [Makefile:2901: compiler_cycle] Fehler 2
make[2]: Verzeichnis „/home/theo/opt/fpc-trunk“ wird verlassen
make[1]: *** [Makefile:2933: build-stamp.i386-android] Fehler 2
make[1]: Verzeichnis „/home/theo/opt/fpc-trunk“ wird verlassen
make: *** [Makefile:3001: crossinstall] Fehler 2
Should I have used CROSSOPT ?
$ sudo make crossinstall OS_TARGET=android CPU_TARGET=arm PP=$localcompiler CROSSOPT=-dFPC_USE_LIBC
....
/usr/bin/mkdir -p /home/theo/opt/fpc-trunk/rtl/units/arm-android
arm-linux-androideabi-as -o /home/theo/opt/fpc-trunk/rtl/units/arm-android/prt0.o arm/prt0.as
arm-linux-androideabi-as -o /home/theo/opt/fpc-trunk/rtl/units/arm-android/dllprt0.o arm/dllprt0.as
/home/theo/opt/fpc-trunk/compiler/ppcrossarm -Ur -Tandroid -Parm -XParm-linux-androideabi- -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -Fi../linux -Fi../linux/arm -FE. -FU/home/theo/opt/fpc-trunk/rtl/units/arm-android -darm -dRELEASE -dFPC_USE_LIBC -Us -Sg ../linux/system.pp
osmacro.inc(103,11) Error: overloaded functions have the same parameter list
oscdeclh.inc(109,15) Error: Found declaration: FpFstat(LongInt;var Stat):LongInt; CDecl;
osmacro.inc(109,11) Error: overloaded functions have the same parameter list
oscdeclh.inc(110,15) Error: Found declaration: fpLstat(PChar;PStat):LongInt; CDecl;
osmacro.inc(115,11) Error: overloaded functions have the same parameter list
oscdeclh.inc(111,15) Error: Found declaration: FpStat(PChar;var Stat):LongInt; CDecl;
sysandroid.inc(27,13) Error: Identifier not found "do_syscall"
sysandroid.inc(27,24) Error: Identifier not found "syscall_nr_fcntl"
sysandroid.inc(27,42) Error: Identifier not found "TSysParam"
system.pp(394) Fatal: There were 9 errors compiling module, stopping
Fatal: Compilation aborted
make[4]: *** [Makefile:3590: system.ppu] Fehler 1
make[4]: Verzeichnis „/home/theo/opt/fpc-trunk/rtl/android“ wird verlassen
make[3]: *** [Makefile:2810: android_all] Fehler 2
make[3]: Verzeichnis „/home/theo/opt/fpc-trunk/rtl“ wird verlassen
make[2]: *** [Makefile:2644: rtl_all] Fehler 2
make[2]: Verzeichnis „/home/theo/opt/fpc-trunk“ wird verlassen
make[1]: *** [Makefile:2937: build-stamp.arm-android] Fehler 2
make[1]: Verzeichnis „/home/theo/opt/fpc-trunk“ wird verlassen
make: *** [Makefile:3001: crossinstall] Fehler 2