[Haskell-iPhone] Building a Special Cross-Compiler

Carter Schonwald carter.schonwald at gmail.com
Wed Dec 11 05:03:46 UTC 2013


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 at 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 at haskell.org
> http://www.haskell.org/mailman/listinfo/iphone
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/iphone/attachments/20131211/f1b17d8a/attachment.html>


More information about the iPhone mailing list