On Sun, 2008-07-20 at 15:56 +0100, Ian Lynagh wrote:

> So, I think there are two ways forward. Either Cabal should always tell
> hsc2hs to use GHC when it is building with GHC, or it should always tell
> it to use gcc. But currently Cabal doesn't know where gcc is, and on
> Windows we put it in the GHC install tree somewhere. GHC's build system
> does know where gcc is, but that doesn't help much as we have
> relocatable binary distributions.

The situation we have now where hsc2hs either uses ghc or gcc is totally
bonkers. We should use (g)cc always and never ghc. This will also make
it consistent with using hsc2hs with hugs/nhc98 etc.

> I think that the best plan is:
> * Cabal knows about cc as a program
> * We pass --with-cc to Cabal when building GHC
> * If --with-cc is not passed, Cabal tried to find it itself, including
>   looking in the appropriate place relative to GHC on Windows
> * Cabal tells hsc2hs to use the C compiler it has found
> 
> How does that sound, Duncan?

Sounds fine.

See: http://hackage.haskell.org/trac/hackage/ticket/296

The extra work then is to make sure we pass the right flags to cc that
ghc would have passed, like include dirs etc. I assume these are just
the flags that we get from the package database (which Cabal has access
to) (transitively so including base, rts etc). Are there any other vital
flags that ghc passes to gcc?

Duncan

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to