Product: Fedora https://bugzilla.redhat.com/show_bug.cgi?id=880135
Bug ID: 880135 Summary: Compile GHC packages with -O2 Product: Fedora Version: rawhide Component: ghc-rpm-macros Severity: unspecified Priority: unspecified Reporter: dag.odenhall@gmail.com
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.
Product: Fedora https://bugzilla.redhat.com/show_bug.cgi?id=880135
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Compile GHC packages with |build all packages with ghc |-O2 |-O2
--- Comment #1 from Jens Petersen petersen@redhat.com --- So you are suggesting basically all libraries and executables from base and upwards, right? Should the ghc compiler itself also be built with -O2?
Product: Fedora https://bugzilla.redhat.com/show_bug.cgi?id=880135
--- Comment #2 from Dag Odenhall dag.odenhall@gmail.com --- (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".
Product: Fedora https://bugzilla.redhat.com/show_bug.cgi?id=880135
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|19 |20
https://bugzilla.redhat.com/show_bug.cgi?id=880135
Fedora Admin XMLRPC Client fedora-admin-xmlrpc@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|20 |rawhide
--- Comment #4 from Fedora Admin XMLRPC Client fedora-admin-xmlrpc@redhat.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=880135
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
--- Comment #5 from Jens Petersen petersen@redhat.com --- I thinking to do this now for F20.
Hints on how to do that also welcome. :)
https://bugzilla.redhat.com/show_bug.cgi?id=880135
--- Comment #6 from Jens Petersen petersen@redhat.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=880135
--- Comment #7 from Jens Petersen petersen@redhat.com --- Okay the changes have been committed to master. They should appear in f20 rawhide when ghc-7.6.3 building starts.
https://bugzilla.redhat.com/show_bug.cgi?id=880135
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |MODIFIED
https://bugzilla.redhat.com/show_bug.cgi?id=880135
--- Comment #8 from Jens Petersen petersen@redhat.com --- 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. ;)
https://bugzilla.redhat.com/show_bug.cgi?id=880135
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |CLOSED Resolution|--- |RAWHIDE Last Closed| |2013-08-19 22:31:39
https://bugzilla.redhat.com/show_bug.cgi?id=880135
--- Comment #9 from Fedora Update System updates@fedoraproject.org --- 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
haskell-devel@lists.fedoraproject.org