FreeBSD Bugzilla – Bug 169479
www/firefox always adds -O0 to CFLAGS
Last modified: 2012-07-27 14:30:33 UTC
www/firefox always adds -O0 to CFLAGS regardless of port options and flags defined in __MAKE_CONF
CFLAGS= -O2 -fno-strict-aliasing -pipe
COPTFLAGS= -O2 -pipe
# added by use.perl 2012-06-24 13:46:59
# This file is auto-generated by 'make config'.
# Options for firefox-13.0.1,1
_FILE_COMPLETE_OPTIONS_LIST=DBUS PGO DEBUG LOGGING OPTIMIZED_CFLAGS
Configure log - http://pastebin.com/wDafjAm8
How-To-Repeat: set CFLAGS something like "-O2 -fno-strict-aliasing -pipe" in make.conf, set CPUTYPE to "core2", cd ports/www/firefox and run make configure
You will see:
checking whether the C compiler (cc -O2 -fno-strict-aliasing -pipe -march=core2 -O0 ) works... yes
-O0? Where it comes from?
You can find "-O0" in:
and in many other files in subdirectories
Over to maintainer (via the GNATS Auto Assign Tool)
Currently, Firefox (and other mozilla ports) does not build with base
gcc on higher optimization levels.
> Currently, Firefox (and other mozilla ports) does not build with base gcc on higher optimization levels.
Thank you for info.
But this is absolute incorrect way. Ports must not force user to
change his own preferences and build settings.
I think that more correct way is add an option like following:
OPTIMIZATION Support for optimization levels higher than O0 (needs gcc 4.6+)
And when user selects it, port must pull in required toolchain.
Also, i've removed EXTRA_CFLAGS from makefile and built firefox
successfully using base toolchain from 8.2-RELEASE
This should not happen anymore with the latest version