Is -fvia-C still needed?

Simon Marlow marlowsd at
Fri Sep 26 10:40:17 EDT 2008

leledumbo wrote:
> The reason why I don't like gcc shipped with ghc distribution is that I waste
> my harddisk space for two same compilers, only differ in version (I use
> 4.3.2, ghc ships 3.4.2). And because both are in my PATH, it sometimes
> behaves unexpectedly. For instance, I try to delete the shipped gcc because
> I think ghc will be able to find mine (hmm...I suggest ghc implements this,
> especially for people with low harddisk space). But when I try to compile,
> it complains about not finding gcc. Crazily, upon compiling with -fvia-C it
> runs MY gcc, not the shipped one (gcc bindir is placed before ghc bindir in
> my PATH)! This also happens when I try to bootstrap from source.
> Second reason, if ghc already performs very well using its ncg, I think it's
> better to improve it rather than relying on gcc's one.

If GHC isn't using its own gcc, that's a bug.

We could theoretically ship a cut-down GHC bundle with no gcc, but as 
others have said it's often useful.  For example, hsc2hs needs it, and 
you'll need a gcc if you write 'foreign export' or 'foreign import 
"wrapper"' anywhere in your source code.


More information about the Glasgow-haskell-users mailing list