Hi Nathan,
  I haven't compiled Terra for Android, but I did play around with getting
it to mostly work on the raspberry pi, which also uses ARM. It won't work
out-of-the-box but there are a few tweaks that can be made that will make
it run*.  I don't have the patch in front of me (I can send it out on
monday), but generally the steps are:

1. disable the x86-specific debugging interface in tdebug.cpp via
preprocessor
2. run terra with the -m flag to enable MCJIT, the old ARM JIT in LLVM
doesn't really work.
3. get the ARM compiler options for floating point numbers to match your
ARM core. for the raspbi I had to enable hard floats (TargetOptions on
tcompiler.cpp:239), and manually specify the CPU string in the
ExecutionEngine builder tcompiler.cpp:259. It is likely that this would be
different for a different ARM core, which is why I haven't committed these
changes yet.

*with a few limitations: ARM has a different calling convention from x86 in
LLVM so some function calls will just crash. In particular, calling a C
function from Terra or a Terra function from C will crash if the functions
pass/return any structs by value.

Zach



On Fri, Apr 25, 2014 at 9:19 PM, Nathan Whitehead <[email protected]>wrote:

> I've been playing around with Terra on my desktop, very exciting! Now I
> want to get it working in my game engine on Android.
>
> Has anyone compiled Terra for Android on ARM?
>
> Previously I've gotten LuaJIT working under Android, and LLVM supports ARM
> so it seems like it could work. I spent some time on it and feel like I
> made some progress but haven't got all the way yet. Any advice appreciated.
>
> Best,
> --
> Nathan Whitehead
>
>
> _______________________________________________
> terralang mailing list
> [email protected]
> https://mailman.stanford.edu/mailman/listinfo/terralang
>
>
_______________________________________________
terralang mailing list
[email protected]
https://mailman.stanford.edu/mailman/listinfo/terralang

Reply via email to