[commit: ghc] master: Tidy up cross-compiling (109a1e5)

Simon Marlow marlowsd at gmail.com
Fri Jan 18 16:54:02 CET 2013

On 18/01/13 15:25, Stephen Paul Weber wrote:
> Somebody claiming to be Simon Marlow wrote:
>> Ok, new wiki page is here:
>> http://hackage.haskell.org/trac/ghc/wiki/Building/CrossCompiling
> Is:
> --with-gcc=<gcc> --with-ld=<ld> --with-nm=<nm> --with-objdump=<objdump>
> Necessary?  I guess if the given tools are not on PATH with the normal
> cross-compiling prefix?

Right, I didn't know that autoconf would automatically look for the 
tools as <platform>-tool.  I'll update the docs.

>> Please edit away.  In particular I haven't investigated
>> cross-compiling with LLVM
> That's a bit broken right now (since GHC doesn't pass through the target
> to LLVM), but otherwise just involves having an LLVM that supports the
> target on PATH.
> Also:
> cabal --with-ghc=<cross-ghc> --with-ld=<ld> ...
> What does this do?  So far I've been careful to use a seperate
> ~/.cabal-blah directory to not entangle my two cabals.  Will it handle
> things nicely?  Do you need to tell it where to find ghc-pkg, or will
> --with-ghc work for that? Maybe I can switch to just a script/alias
> instead of a whole config file :)

Ah, in my case the GHC I built was called ghc-7.7.20130116, so it didn't 
clash with anything else in .cabal.  You could also configure your cabal 
to put the arch/os in the directory name.


More information about the ghc-devs mailing list