Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 513178 - www-client/firefox allow using --enable-unified-compilation
Summary: www-client/firefox allow using --enable-unified-compilation
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-14 06:06 UTC by Benjamin Peterson
Modified: 2014-10-16 15:14 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to firefox-30.ebuild (firefox-unified-compilation.patch,439 bytes, patch)
2014-06-14 07:31 UTC, Cănărău Constantin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Peterson 2014-06-14 06:06:59 UTC
Firefox has a build option, --enable-unified-compilation. This concatenates many C++ files together to improve both build time and compiler optimizations. (It does make the build more memory-hungry, though.) It would be nice if this flag could be easily enabled or was even the default.

I would have just passed this myself using ECONF_EXTRAS, but that doesn't seem to work for mozconfig ebuilds.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-06-14 07:23:18 UTC
Does it really make sense nowadays, when we are going to have some LTO soon?
Comment 2 Cănărău Constantin 2014-06-14 07:31:05 UTC
Created attachment 378848 [details, diff]
Patch to firefox-30.ebuild
Comment 3 Cănărău Constantin 2014-06-14 07:32:40 UTC
Nice hint!

     Tue May 20 18:51:26 2014 >>> www-client/firefox-29.0.1
       merge time: 22 minutes and 30 seconds.

     Sat Jun 14 10:21:45 2014 >>> www-client/firefox-30.0
       merge time: 15 minutes and 9 seconds.

~ 30% compile time improvment
Comment 4 Benjamin Peterson 2014-06-14 07:37:06 UTC
As Cănărău demonstrated, the main advantage is improved compilation time, which is orthogonal to LTO.
Comment 5 Cănărău Constantin 2014-08-02 12:06:45 UTC
since v31 also Thunderbird support this configure option.
Compile time improvments are spectacular.
Comment 6 Ian Stakenvicius (RETIRED) gentoo-dev 2014-10-14 21:49:54 UTC
I'm not certain I want to add this as an option, but what I may be able to do is add --enable-unified-compilation to the mozconfig when it exists in EXTRA_ECONF.  Would that suffice?
Comment 7 Benjamin Peterson 2014-10-14 23:22:08 UTC
That sounds fine.
Comment 8 Ian Stakenvicius (RETIRED) gentoo-dev 2014-10-15 14:25:20 UTC
Ok, so in mozilla-overlay i updated the eclass so that it honors the value(s) specified in EXTRA_ECONF.  FYI, if you break it you pick up the pieces.

Right now, it just passes everything through to mozconfig; likely I will add a whitelist of allowable options at some point before this is added to the portage tree but we shall see.
Comment 9 Ian Stakenvicius (RETIRED) gentoo-dev 2014-10-16 14:15:34 UTC
...this bug may soon be moot; if I'm reading configure.in from firefox-33 correctly, unified-compilation is enabled by default.  I'm going to look closer to confirm, and if that's the case then I'm going to leave it to upstream to set the default.  I may still consider enabling this option in 31ESR as well, but there are more urgent issues I have to sort out before I can test that fully.
Comment 10 Ian Stakenvicius (RETIRED) gentoo-dev 2014-10-16 15:14:12 UTC
confirmed, mozilla 31.2 and 33 codebases both have unified compilation enabled by default and we would need to explicitly disable it in our configuration, which we don't.  Closing this one, as I don't want to open EXTRA_ECONF generally at this time.