FPC - Compile To Android (ARM) On Mac

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

FPC - Compile To Android (ARM) On Mac

Lennie De Villiers
Hi, 

Has anyone got this right and wiling to share some knowledge?

cheers

Lennie

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC - Compile To Android (ARM) On Mac

Schindler Karl-Michael-2
Lennie De Villiers <[hidden email]> wrote:

> Hi,
>
> Has anyone got this right and wiling to share some knowledge?
>
> cheers
>
> Lennie

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?

MiSchi_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC - Compile To Android (ARM) On Mac

Dejan Boras
In reply to this post by Lennie De Villiers
On 3.3.2011. 15:18, Lennie De Villiers wrote:

> Hi,
>
> Has anyone got this right and wiling to share some knowledge?
>
> cheers
>
> Lennie
>
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
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.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

tools.zip (7K) Download Attachment