[Haskell-iPhone] Building a Special Cross-Compiler
Simon Marlow
marlowsd at gmail.com
Wed Dec 11 08:27:24 UTC 2013
Yes, this is correct. ghc_boot_platform describes the platforms for the
stage 1 compiler (assuming you're looking at the one in
compiler/stage1). ghcplatform.h describes the platforms in use for
compiled code, so the host in that case is ios. In fact ghcplatform.h
shouldn't have a target platform at all - the only reason it does is for
"backwards compatibility", though I don't remember exactly what goes
wrong if we remove these.
Cheers,
Simon
On 11/12/2013 00:08, Alex Carter 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
>
More information about the iPhone
mailing list