[Haskell-iPhone] Building a Special Cross-Compiler

Alex Carter alrunner4 at gmail.com
Wed Dec 11 00:08:20 UTC 2013


I'm on an interesting journey building a GHC cross-compiler on Windows
to target iOS, using a third-party iOS toolchain for Windows
(http://www.pmbaty.com/iosbuildenv/ for the curious), and I'm running
into an unusual issue. Since this is a cross-compiler, this should be
all stage 1, so in ghc_boot_platform.h I see what I expect:

    ...
    #define BUILD_OS "mingw32"
    #define HOST_OS "mingw32"
    #define TARGET_OS "ios"
    ...

but ghcplatform.h shows:

    ...
    #define BUILD_OS  "mingw32"
    #define HOST_OS  "ios"
    ...
    #define TARGET_OS  "ios"
    ...

which I understand to mean that whatever's happening there is set up
for the stage 2 compiler (unless there's some good magic happening
here with the deriveConstants utility?). I discovered this through a
pragma added at the error site:

    ...
    rts/Task.h:280:9: note: #pragma message: HOST_OS=ios
    rts/Task.h:287:5: error: aggregate value used where an integer was expected
    ...

Anybody know what's going on here? Is it right (for some reason beyond
my current comprehension) for ghcplatform.h to have the #defines it
does? Is HOST_OS=ios correct, but rts/Task.h:280 should also check
defined(ios_HOST_OS)?

Thanks for the help,
Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make.log
Type: application/octet-stream
Size: 90428 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/iphone/attachments/20131210/c27bd156/attachment-0001.obj>


More information about the iPhone mailing list