Is -fvia-C still needed?

Claus Reinke claus.reinke at talk21.com
Fri Sep 26 13:07:37 EDT 2008


>> 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.

Having fully-functional-out-of-the-box GHC installers is very useful,
but you might be interested in 
http://hackage.haskell.org/trac/ghc/ticket/1502
which promises to reduce the tension by making GHC's gcc just
another gcc (so you'll be more likely to get by with only one gcc)

Claus




More information about the Glasgow-haskell-users mailing list