Cross-compiling Haskell code for ARM via LLVM
karel.gardas at centrum.cz
Mon Feb 13 06:46:28 CET 2012
On 02/13/12 02:38 AM, Ricardo Wurmus wrote:
> 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).
> I've filed a bug in the LLVM bugzilla.
> I'm passing these arguments to GHC: -Wall -fllvm -optlc=-march=arm
This is not going to work now IMHO, since at least LlvmCodeGen/Ppr.hs
provides platform specific module layout specification. As current GHC
does not support cross-compilation *yet* (see Stephen's work on mailing
list), then you are basically supplying LLVM llc with x86 specific data
layout attempting to compile for ARM...
More information about the Cvs-ghc