Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 188619

Summary: make.conf.example - 'decent' CFLAGS should not feature -O3
Product: Portage Development Reporter: Jakub Moc (RETIRED) <jakub>
Component: DocumentationAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: 2.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 181949, 189285    

Description Jakub Moc (RETIRED) gentoo-dev 2007-08-12 18:12:21 UTC
# Decent examples:
#CFLAGS="-mcpu=athlon-xp -O3 -pipe"
#CFLAGS="-march=pentium3 -O3 -pipe"

This doesn't match neither the compilation optimization guide [1], nor the devmanual documentation [2], nor ALLOWED_FLAGS in flag-o-matic.eclass. In fact, lots of ebuild replace -O3, plus it actually makes things mostly slower (both compile-time wise and at runtime w/ gcc-4.x).

[1] http://www.gentoo.org/doc/en/gcc-optimization.xml#doc_chap2
[2]http://devmanual.gentoo.org/ebuild-writing/functions/src_compile/build-environment/index.html

Replace this with -O2, please.
Comment 1 solar (RETIRED) gentoo-dev 2007-08-12 18:18:54 UTC
Sending        cnf/make.conf.alpha.diff
Sending        cnf/make.conf.arm.diff
Sending        cnf/make.conf.ppc.diff
Sending        cnf/make.conf.ppc64.diff
Sending        cnf/make.conf.sh.diff
Sending        cnf/make.conf.sparc.diff
Sending        cnf/make.conf.x86-fbsd.diff
Sending        cnf/make.conf.x86.diff
Transmitting file data ........
Committed revision 7596.
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-08-12 21:01:31 UTC
(In reply to comment #1)
> Sending        cnf/make.conf.arm.diff
> Sending        cnf/make.conf.ppc.diff
> Sending        cnf/make.conf.ppc64.diff
> Sending        cnf/make.conf.sh.diff

Firstly, texts in these files are now at least strange.
E. g.:"Don't use -O2.  Even -O2 may be risky in some cases."
"That option is implied by -O2 -Os and -O2."
"Long term testing has shown that -O2 opts can be unreliable on G4's but work on G3 series processors or earlier."
"-O2 for the most part seems ok but should be used with caution as for instance app-editors/vim has problems if it is used. -O2 is a good selection."

Secondly, if these changes will be backported to branches/2.1.2, then this bug should stay open and should block Bug 181949.
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-08-13 18:07:41 UTC
Thanks for r7597.
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-08-15 14:34:27 UTC
This bug should block Bug 181949.
Comment 5 Zac Medico gentoo-dev 2007-08-16 00:44:14 UTC
This has been released in 2.1.3.6.