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

Bug 18842

Summary: extra_functions.sh needs "mtune" in ALLOWED_FLAGS
Product: Portage Development Reporter: Christian Birchinger (RETIRED) <joker>
Component: UnclassifiedAssignee: Nicholas Jones (RETIRED) <carpaski>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: Sparc   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Christian Birchinger (RETIRED) gentoo-dev 2003-04-05 22:36:17 UTC
The ALLOWED_FLAGS variable needs "mtune" included.

Sparc has not the normal -march -mcpu combo. Instead it has -mcpu and -mtune.

On sparc -mcpu does what -march does on x86 (Binary runs only on that cpu)
and -mtune does what -mcpu does on x86 (Optimizes for a cpu but doesn't break
compatibility)

Bad and confusing but a fact

Reproducible: Always
Steps to Reproduce:
1.Emerge an ebuild with strip-flags.
2.Build process gets the needed mtune flag removed.

Actual Results:  
Result is a generic unoptimized binary.

Expected Results:  
strip-flags should not remove mtune.

Just the same way as it allows mcpu and march on x86.

The change needs to be done in:

/usr/lib/portage/bin/extra_functions.sh 

- ALLOWED_FLAGS="-O -mcpu -march -pipe -g"
+ ALLOWED_FLAGS="-O -mcpu -march -mtune -pipe -g"

Would be really good if it gets added before the sparc 1.4 release.
Comment 1 Christian Birchinger (RETIRED) gentoo-dev 2003-04-06 16:43:46 UTC
Just found out that it could be also be in "flag-o-matic.eclass". Don't know
if the eclass or the extra_functions.sh is used.
Comment 2 Joshua Brindle (RETIRED) gentoo-dev 2003-04-06 21:09:55 UTC
done