Trying to port a Delphi library to Android. Free Pascal has Android/ARM support - a prebuilt compiler for Windows is available. However, Android NDK now supports MIPS and x86 as well. What's the status of support for those in FPC? For now, my project is more or less CPU agnostic - the native bits are built for all four supported architectures. Don't want to let go of that.
I'm not after the full cycle of Android development in Pascal - just an algorithm library that does no I/O. I tried translating it into C with p2c, but the translator chokes on the sources.
Should I just try and build cross-compiler for the relevant CPU with Linux, and then link against the NDK libraries?
EDIT: I've built the cross-compiler for Intel/Linux from the sources of the Android branch. It works, except you have to invoke ppcross386
to compile, not fpc
. The latter, it seems, ignores the -Tlinux option and invokes the Intel/Win32 compiler.
EDIT2: with a small change to the makefile and sources, the MIPS cross-compiler builds. However, as building moves on to the cross-CPU RTL, it errors out almost right away.