ports/169479: www/firefox always adds -O0 to CFLAGS

Niclas Zeising niclas.zeising at gmail.com
Wed Jun 27 19:38:14 UTC 2012


On 06/27/12 20:00, AN wrote:
>
>
> On Wed, 27 Jun 2012, Sayetsky Anton wrote:
>
>> The following reply was made to PR ports/169479; it has been noted by
>> GNATS.
>>
>> From: Sayetsky Anton <vsjcfm at gmail.com>
>> To: bug-followup at freebsd.org
>> Cc:
>> Subject: Re: ports/169479: www/firefox always adds -O0 to CFLAGS
>> Date: Wed, 27 Jun 2012 13:15:51 +0300
>>
>> > 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.
>>
> I have gcc 4.6+ installed, I want to use it to compile FF. How do I tell
> firefox to use gcc 4.6+ to build?

cd /usr/ports/www/firefox && env CC=gcc46 CXX=g++46 CPP=cpp46 make 
install clean should work.
However, to avoid building at -O0 you have to edit the Makefile for 
firefox and remove the line EXTRA_CFLAGS=-O0.
Hope this help!
-- 
Niclas Zeising


More information about the freebsd-gecko mailing list