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

Bug 152841

Summary: sys-fs/mdadm uses 'wrong' gcc
Product: Gentoo Linux Reporter: gent_bz
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description gent_bz 2006-10-25 22:12:26 UTC
ROOT=/blah/ PORTAGE_CONFIGROOT=/blah/ sudo emerge mdadm

/ is amd64
/blah/ is i686

gcc is invoked by mdadm's Makefile which - in this case - produces an error (error: CPU you selected does not support x86-64 instruction set) as gcc is invoked with -march=athlon-xp for the hosted environment.

Solution : to have Makefile invoke more specific gcc (i686-pc-linux-gnu-gcc in this case)

Makefile seems to have support for setting $CROSS_COMPILE to specify prefix to gcc.
Comment 1 gent_bz 2006-10-25 22:26:12 UTC
Adding the following line below emake in the ebuild seems to give correct results on amd64 and x86.


                CROSS_COMPILE="${CHOST}-" \
Comment 2 SpanKY gentoo-dev 2006-10-26 12:53:14 UTC
added your fix to the 2.5.5 ebuild, thanks !