IMCROSS and ghc
marlowsd at gmail.com
Thu Dec 11 05:03:16 EST 2008
Duncan Coutts wrote:
> On Wed, 2008-12-10 at 11:19 -0800, John Meacham wrote:
>> I was wondering if anyone has gotten ghc to work with IMCROSS. I'm
>> Cross is a way to build native windows and mac osx apps on linux. quite
>> convinient for making distribution packages for those other platforms or
>> if you want to use linux's toolset during your build.
>> basically, IMCROSS installs a couple new gccs with names like
>> /usr/local/bin/i386-mingw-gcc and so forth, is there some way to get ghc
>> to use said non-native compiler as its back end? It seems that ghc will
>> also need to build the libraries with different #define's as well to
>> reflect the target windows or mac environment.
> It sounds like you would need to set ghc up as a cross-compiler. I'm
> told that this there is a fair bit of work required to get ghc to
> support cross-compilation. I expect Ian or Simon could provide more
> details on what would need doing if you're interested in pursuing it.
Right - the stage 1 compiler has to be a cross-compiler, running on the
host system and generating binaries for the target system. Bits of the
infrastructure are in place (i.e. we make some attempt to use the right
_HOST_ARCH vs. TARGET_ARCH #defines), but we've never actually done real
cross-compilation with GHC so I imagine there will be various things to
fix. The build system probably assumes that host==target in lots of places.
More information about the Glasgow-haskell-users