Decoupling -O from -fvia-C
Simon Marlow
simonmarhaskell at gmail.com
Fri Dec 1 04:42:33 EST 2006
Wolfgang Thaller wrote:
> I think it is again time to discuss whether -O should still imply - fvia-C.
>
> I have recently committed a few patches that allow the NCG to compile
> the RTS. Position-independent code works in the NCG on Darwin/x86 and
> (almost untested) on Linux/x86, but will never work in for -fvia-C
> compilation. So now there are situations where -fasm is required, and
> there are fewer and fewer situations where -fvia-C is required.
>
> The Makefile in compiler/ adds -O to the HC_OPTS for some files, which
> overrides any global -fasm, so compiling a libHSghc_dyn.dylib (or .so)
> requires editing the Makefile.
>
> The only argument for having -O imply -fvia-C that I am aware of is
> that -fvia-C code is slightly faster than -fasm on x86. This was not
> even the case on PowerPC, last time I checked.
Yes, this has been at the back of my mind for a while. We should change this.
Please go forth and commit...
Cheers,
Simon
More information about the Cvs-ghc
mailing list