Java Mailing List Archive

http://www.redhatconfig.com/

Home » Mandriva Cooker »

[Cooker] Firefox 3 optimization flags

Frederik Himpe

2008-06-21

Replies: Find Java Web Hosting

Author LoginPost Reply
According to about:buildconfig, Mandriva's Firefox 3 package has been
compiled with
'--enable-optimize=-O2\ -g\ -pipe\ -Wp,-D_FORTIFY_SOURCE=2\ -fexceptions
\ -fstack-protector\ --param=ssp-buffer-size=4\ -fstack-protector-all\
-fno-strict-aliasing'

Mozilla is explicitely disapproving this use of --enable-optimization,
because it results in suboptimal performance. They have done a lot of
testing with different flags and compilers themselves, and now different
parts of Firefox are compiled with different optimization flags, which
is all overridden if you pass your own flags with --enable-optimize.

The solution is to configure Firefox with a plain --enable-optimze, and
set the following CFLAGS and CXXFLAGS variables
CFLAGS="-g\ -pipe\ -Wp,-D_FORTIFY_SOURCE=2\ -fexceptions -fstack-protector\ --param=ssp-buffer-size=4\ -fstack-protector-all"
CXXFLAGS="-g\ -pipe\ -Wp,-D_FORTIFY_SOURCE=2\ -fexceptions -fstack-protector\ --param=ssp-buffer-size=4\ -fstack-protector-all"

i.e. all Mandriva non-optimization flags.

-no-strict-aliasing is not necessary, as Firefox sets it itself in the
modules where it is necessary:
http://lxr.mozilla.org/seamonkey/search?string=MODULE_OPTIMIZE_FLAGS

See also http://wiki.mozilla.org/Linux/Compiler_Options for reference.

Can this be fixed in our packages please?

--
Frederik Himpe <fhimpe@(protected)>

©2008 redhatconfig.com - Jax Systems, LLC, U.S.A.