Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 228787 - www-client/mozilla-firefox-3.0-r1: ebuild seems to not let firefox use its defaults for optimizing
Summary: www-client/mozilla-firefox-3.0-r1: ebuild seems to not let firefox use its de...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-21 17:31 UTC by Pacho Ramos
Modified: 2008-07-18 17:59 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2008-06-21 17:31:00 UTC
From:
http://wiki.mozilla.org/Linux/Compiler_Options#Proper_use_of_compiler_options

Seems that firefox should be compiled with "--enable-optimize" plain option letting firefox parts be compiled with different flags chosen by mozilla for each component

Also, ebuild is now calling "edit_makefiles" (from makeedit.eclass) and I am not sure if it could affect to this also

Thanks

Reproducible: Always
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2008-06-21 22:43:22 UTC
Collides with peoples wish that /their/ compiler flags are used, probably not bad to do so with, when the bindist use flag is set, though.
Comment 2 Pacho Ramos gentoo-dev 2008-06-22 00:12:32 UTC
(In reply to comment #1)
> Collides with peoples wish that /their/ compiler flags are used, probably not
> bad to do so with, when the bindist use flag is set, though.
> 

upstream suggests simply export CFLAGS and CXXFLAGS variables to desired values for this in conjuction with --enable-optimize usage :-)
Comment 3 Raúl Porcel (RETIRED) gentoo-dev 2008-06-24 16:59:47 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Collides with peoples wish that /their/ compiler flags are used, probably not
> > bad to do so with, when the bindist use flag is set, though.
> > 
> 
> upstream suggests simply export CFLAGS and CXXFLAGS variables to desired values
> for this in conjuction with --enable-optimize usage :-)
> 

And thats we do.
Comment 4 Pacho Ramos gentoo-dev 2008-06-24 17:59:55 UTC
(In reply to comment #3)
> And thats we do.
> 

But seems (from their wiki page) that also "--enable-optimize" (without any other argument) should be used also
Comment 5 Raúl Porcel (RETIRED) gentoo-dev 2008-06-24 18:26:28 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > And thats we do.
> > 
> 
> But seems (from their wiki page) that also "--enable-optimize" (without any
> other argument) should be used also
> 
But that would override user's -O value.
Comment 6 Pacho Ramos gentoo-dev 2008-06-24 18:42:57 UTC
(In reply to comment #5)
> But that would override user's -O value.
> 


Yes, but other CFLAGS like -march would still be applied. This could be maybe handled with a USE flag like "custom-cflags" or anything else...
Comment 7 Pacho Ramos gentoo-dev 2008-06-24 18:51:54 UTC
Well , after re-reading the wiki:
> If you still need to pass in other non-optimization flags to the compile, please > use CFLAGS and CXXFLAGS instead of passing them to --enable-optimize.

Only CFLAGS without -O should be used in conjuction with "--enable-optimize" for compile firefox like mozilla wants :-/, maybe "filter-flags" from flag-o-matic.eclass could be used for filter -O* when merging without "custom-cflags" USE enabled...
Comment 8 Pacho Ramos gentoo-dev 2008-06-24 19:00:49 UTC
I have also seen that "edit_makefiles" from makedit.eclass seems no longer needed with firefox3 because running:
$ find . \( -iname makefile -o -name \*.mk -o -name GNUmakefile \)

from sources dir doesn't output anything (not like in 2.0, that makes it output a lot of files)
Comment 9 Raúl Porcel (RETIRED) gentoo-dev 2008-06-28 16:05:38 UTC
I'm looking into this, but i'd say its a bit crazy to use those flags added by mozilla...

We'll see...
Comment 10 Carsten Lohrke (RETIRED) gentoo-dev 2008-06-28 16:37:38 UTC
(In reply to comment #9)
> I'm looking into this, but i'd say its a bit crazy to use those flags added by
> mozilla...

I'd not say so. It's the question what the specific optimizations are and what hardware they used for profiling. Optimizations based on profiling may result in quite better performing code, but I doubt these optimizations are really optimal for almost all machines.

What may mozilla.org use to build? -march=i686 -O2 and a number of -mtune= flags!?
Comment 11 Pacho Ramos gentoo-dev 2008-06-28 17:40:55 UTC
(In reply to comment #10)
> What may mozilla.org use to build? -march=i686 -O2 and a number of -mtune=
> flags!?
> 

mozilla will only change -O* values, it doesn't change or specifies -march or -mtune, you can see one example of this in:
https://bugzilla.mozilla.org/show_bug.cgi?id=409803#c9

Then, firefox ebuild should only filter all -O* flags for letting mozilla choose its default, all other FLAGS (like -march=k8, for example) would be preserved as user chosen in his make.conf
Comment 12 Raúl Porcel (RETIRED) gentoo-dev 2008-07-18 17:59:04 UTC
Fixed