you may want to ask this on ghc-devs, seems to be a more general cross compiler question than this list is able to handle


On Tue, Dec 10, 2013 at 7:08 PM, Alex Carter <alrunner4@gmail.com> wrote:
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

_______________________________________________
iPhone mailing list
iPhone@haskell.org
http://www.haskell.org/mailman/listinfo/iphone