[Haskell-beginners] ghc and android
Brandon Allbery
allbery.b at gmail.com
Sun Dec 30 15:43:47 CET 2012
On Sun, Dec 30, 2012 at 8:19 AM, Nathan Hüsken <nathan.huesken at posteo.de>wrote:
> Is it currently possible to build haskell programs for android using the
> android NDK?
> If course, I know, bindings have to be written and android GUIs have to be
> written in Java. But if I would write the bindings for the things I need...?
>
GUIs can be written without requiring Java/Dalvik, at least on the more
recent versions of Android. It's the basic runtime support that is still a
bit lacking, last I checked.
> Via C/gcc? Its not the fastest, but should work, should it not?
>
It's nonexistent for ARM; to get a working -fvia-C you have to go back to
ghc versions that don't have any clue about ARM (if you want to scare
yourself, check out via-C's Evil Mangler sometime). And I think the hosted
build isn't working at the moment?
> Via llvm?
>
I believe this is how current ARM development is doing it, rather than try
to code up a native code generation backend. (I also get the impression
that the NCGs are going to be deprecated in favor of -fllvm at some point,
although they want to clean up some lingering optimization issues first;
llvm wins for many things but does somewhat poorly for a few.)
An additional issue: ghci (and Template Haskell because it uses the
bytecode interpreter of ghci internally) currently(?) requires its own
custom linker instead of being able to use the system linker. Said linker
has no support for ARM. The correct fix for this is to redesign ghci so it
doesn't need its own linker; there has been some work in this direction,
but I don't know how complete it is, and it interacts with other issues
such as building Haskell libraries as shared objects.
--
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20121230/2a2eacfa/attachment.htm>
More information about the Beginners
mailing list