Problem: If you want to compile your Haskell application with -O2, only parts of it will be - most system packages are already built with -O1. All your own code is going to link to those prebuilt binaries. Does it matter? Respectable people in the community claim -O2 really does produce better code: http://stackoverflow.com/questions/11108746/difference-between-ghcs-o-and-o2 Cons: The fedora packages will take longer to build. Counter argument: This shouldn't happen often though, and I guess is done by some build service [koji?]. Users will just install prebuilt packages with no compilation time at all and benefit from optimized binaries. Footnote: This is only about building the fedora packages with -O2. Our cabal-install package should not be changed to default to -O2 for user compilation.
So you are suggesting basically all libraries and executables from base and upwards, right? Should the ghc compiler itself also be built with -O2?
(In reply to comment #1) > So you are suggesting basically all libraries and executables from base and > upwards, right? > Should the ghc compiler itself also be built with -O2? I'm primarily talking about libraries here, as those are what user-compiled code will link to. I suppose it follows then that this also means GHC libraries like ghc-prim, and that the GHC executable itself is "optional".
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle. Changing version to '19'. (As we did not run this process for some time, it could affect also pre-Fedora 19 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
The Fedora 20 component was created in error. We only create new Fedora versions when we branch a new release. These bugs are all being moved to rawhide. Please retarget them to 19 if they also apply to the Fedora 19 branched release. Thanks.
I thinking to do this now for F20. Hints on how to do that also welcome. :)
Okay seems ghc can be done with "BuildFlavour=perf" in build.mk. It should be easy enough to make ghc-rpm-macros pass -O2 to Cabal.
Okay the changes have been committed to master. They should appear in f20 rawhide when ghc-7.6.3 building starts.
This should be in tomorrow's rawhide. I am not sure how to verify -O2 other than looking at buildlogs. ghc feels faster though I haven't benchmarked - but I think compiling packages with -O2 somewhat "cancels" the build speedup effect. ;)
ghc-7.4.2-11.2.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/ghc-7.4.2-11.2.fc19