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

Bug 51549

Summary: gcc-3.4.0-r4 ebuild wrongly translates -mcpu to -mtune
Product: Gentoo Linux Reporter: Felix Riemann <friemann>
Component: [OLD] GCC PortingAssignee: Please assign to toolchain <gcc-porting>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 48528    

Description Felix Riemann 2004-05-20 04:04:27 UTC
My CFLAGS contain "-mcpu=athlon-xp". Whe I try to emerge gcc-3.4.0-r4 the CFLAGSg et stripped down by the ebuild to "CFLAGS=" -march=athlon-xp -mtune=athlon-xp -pipe -O2" changing -mcpu to -mtune. gcc-3.3.3 doesn't support the -mtune-flag leading to a failing configure: 

"cc1: error: invalid option `tune=athlon-xp'
*** The command 'gcc -o conftest  -march=athlon-xp -mtune=athlon-xp -pipe -O2 conftest.c' failed.
*** You must set the environment variable CC to a working compiler."

Removing -mcpu from my CFLAGS keeps it working.

Portage 2.0.50-r6 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3_pre20040420-r0, 2.6.6-love4)
=================================================================
System uname: 2.6.6-love4 i686 AMD Athlon(tm) XP
Gentoo Base System version 1.4.14
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-fexpensive-optimizations -fstack-protector -march=athlon-xp -mcpu=athlon-xp -msse -m3dnow -mmmx -ftracer -O4 -fomit-frame-pointer -finline-functions -falign-jumps=4 -falign-loops=4 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
Comment 1 Travis Tilley (RETIRED) gentoo-dev 2004-05-29 19:58:24 UTC
hmm. sorry about that. try r5, it filters -mcpu completely. (mcpu breaks the build of gcc 3.4 at libiberty)