[Haskell-cafe] Cross ghc-7.8.3 for PowerPC build fails

Jon Schneider haskell at jschneider.net
Thu Nov 6 09:26:16 UTC 2014


Definitely but given I've just switched from a successfulish looking ARM
version to a PowerPC x86 popping out was the last thing I expected.

Though it's not the first time I have attempted to cross-compile with
(slightly older versions of) clang/LLVM and found it confused about its
architectures.

I have since knocked the -fllvm from SRC_HC_OPTS and GhcStage1HcOpts and
that got me past the immediate hurdle producing a powerpc---ghc which
which I could compile a helloworld.hs but the result hangs. So far I've
only got as far as checking that yes the entry point, _start has PowerPC
and not complete garbage code. I shall dig a bit deeper today equipped
with a flimsy knowledge of both Haskell and PowerPC.

Jon

>
> I'd use NCG instead of LLVM and still there is something fishy about
> your setup since this generated assembly looks like x86 to me.
>
> Cheers,
> Karel
>
> On 11/ 4/14 01:34 PM, Jon Schneider wrote:
>> libraries/ghc-prim/dist-install/build/GHC/Types.o
>> /tmp/ghc30000_0/ghc30000_5.s: Assembler messages:
>>
>> /tmp/ghc30000_0/ghc30000_5.s:8:0:
>>       Error: Unrecognized opcode: `movl'
>> and so on with opcodes such as jbe, leal, jmpq and also "junk at end of
>> line: `rcx),%esi'"
>> ======
>
>



More information about the Haskell-Cafe mailing list