> Has anyone got this right and wiling to share some knowledge?
Maybe the fink packages for the arm-linux crosscompiler and the arm-linux binutils can help you; at least as a template for starting. Does it matter that they are release versions only, not the 2.5.1 version from trunk?
I've got it right, but unfortunately only on Windows. However I hope
I'll help with a few insights.
Things to look out for: gnu assembler needs "-meabi=5" passed when
something is compiled. This can be achieved by writing a hook script (a
program that will serve as the assembler but will transfer all
parameters along with additional -meabi=5 to the original assembler).
You'll need to pass -CpARMV5 and -CfSOFT parameters to FPC. You'll also
need to apply a patch to the fpc sources when building your
crosscompiler, since there are issues with getting environment variables
and arguments in a shared library under Android (bug #18833). This
patch does not fix the issue, it just sets argc, argv and envp to nil
values so sysutils and others don't crash when trying to access
environment variables or arguments
I've attached the patch, and all the scripts I use to build a working
crosscompiler. These are intended for windows, but you'll probably only
need to modify the paths and convert the .cmd files to .sh (or type this
stuff yourself in a terminal).
You'll also need a set of arm-linux (gnueabi) binutils. I simply used
prebuilt ones, but you may need to compile these yourself.