On Mon, 13 Feb 2012 09:38:44 +0800, Ricardo Wurmus <[email protected]> 
wrote:
> Hi,
> 
> I'm trying to compile my Haskell project on x86_64 with GHC 7.4.1 and
> the LLVM backend for ARM, but LLVM's llc either segfaults (version
> 3.0) or aborts (2011-07-12 revision with patch as described here[1]).
> I've filed a bug in the LLVM bugzilla[2].
> 
While I don't cross-compile, I've been using LLVM straight from the
repository in my testing. I've found that ARM support in the 3.0 release
is less than stellar (at least in terms of testsuite performance) and
I don't recall July being much better. My PandaBoard is currently
running a commit from mid-January without any issues.

> I'm passing these arguments to GHC: -Wall -fllvm -optlc=-march=arm
> 
> ARM is listed as a Tier 2 platform[3] and I gathered from various
> mailing list posts that cross-compiling through LLVM is supposed to
> work. Is this really the case?
> 
I could be wrong but I don't believe this is currently the case. It is
true that recently there has been discussion regarding merging various
patches allowing GHC to be built in cross-compier mode (see Stephen
Blackheaths remarks; most recently [2]), but as far as I know this has
not yet happened.

> In case I'm mistaken, is there currently a way to have GHC generate
> LLVM bytecode that llc can translate into executables for the ARM
> platform?
>
To answer your question, technically there is a -ddump-llvm flag [1]. That
being said, I do not believe it will be as easy as passing the IR code
to llc with the correct flags. I could be wrong though.

Cheers,

- Ben


[1] 
http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM/Installing
[2] CAK-hX0n4=2epgcsrbd_nkoeikccoxt4s0ogwpj0uwfvnhx0...@mail.gmail.com

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to