Bug 152841 - sys-fs/mdadm uses 'wrong' gcc
Bug#: 152841 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: base-system@gentoo.org Reported By: jadamcze@utas.edu.au
Component: Applications
URL: 
Summary: sys-fs/mdadm uses 'wrong' gcc
Keywords:  
Status Whiteboard: 
Opened: 2006-10-25 22:12 0000
Description:   Opened: 2006-10-25 22:12 0000
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 From Jonathan Adamczewski 2006-10-25 22:26:12 0000 -------
Adding the following line below emake in the ebuild seems to give correct
results on amd64 and x86.


                CROSS_COMPILE="${CHOST}-" \

------- Comment #2 From SpanKY 2006-10-26 12:53:14 0000 -------
added your fix to the 2.5.5 ebuild, thanks !