You missed another flag: USE="custom-cflags". You should really > read USE flag descriptions (/usr/portage/use.{,local.}desc): > > custom-cflags - Build with user-specified CFLAGS (unsupported) > www-client/firefox:custom-optimization - Fine-tune custom compiler > optimizations (-Os, -O0, -O1, -O2, -O3) > > So custom-optimization will only get -O[0123s] option from your > CFLAGS,
That's all I want. However, the -O2 was still filtered even though i have custom-optimization on. emerge --info output; ================================================================= Package Settings ================================================================= www-client/firefox-47.0::gentoo was built with the following: USE="*custom-optimization* dbus gmp-autoupdate gtk2 hwaccel jemalloc3 jit pulseaudio -bindist -custom-cflags -debug -hardened (-neon) (-pgo) (-selinux) -startup-notification (-system-cairo) -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite -test -wifi" ABI_X86="64" LINGUAS="-ach -af -an -ar -as -ast -az -be -bg -bn_BD -bn_IN -br -bs -ca -cs -cy -da -de -el -en_GB -en_ZA -eo -es_AR -es_CL -es_ES -es_MX -et -eu -fa -fi -fr -fy_NL -ga_IE -gd -gl -gu_IN -he -hi_IN -hr -hsb -hu -hy_AM -id -is -it -ja -kk -km -kn -ko -lt -lv -mai -mk -ml -mr -ms -nb_NO -nl -nn_NO -or -pa_IN -pl -pt_BR -pt_PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv_SE -ta -te -th -tr -uk -uz -vi -xh -zh_CN -zh_TW" CFLAGS=*"-march=amdfam10 -pipe"* CXXFLAGS="-march=amdfam10 -pipe" LDFLAGS="-Wl,-O1 -Wl,--as-needed -march=amdfam10 -pipe -Wl,-rpath=/usr/lib64/firefox"