<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>152841</bug_id>
          
          <creation_ts>2006-10-25 22:12 0000</creation_ts>
          <short_desc>sys-fs/mdadm uses &apos;wrong&apos; gcc</short_desc>
          <delta_ts>2006-10-26 12:53:14 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>jadamcze@utas.edu.au</reporter>
          <assigned_to>base-system@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>jadamcze@utas.edu.au</who>
            <bug_when>2006-10-25 22:12:26 0000</bug_when>
            <thetext>ROOT=/blah/ PORTAGE_CONFIGROOT=/blah/ sudo emerge mdadm

/ is amd64
/blah/ is i686

gcc is invoked by mdadm&apos;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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jadamcze@utas.edu.au</who>
            <bug_when>2006-10-25 22:26:12 0000</bug_when>
            <thetext>Adding the following line below emake in the ebuild seems to give correct results on amd64 and x86.


                CROSS_COMPILE=&quot;${CHOST}-&quot; \</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-10-26 12:53:14 0000</bug_when>
            <thetext>added your fix to the 2.5.5 ebuild, thanks !</thetext>
          </long_desc>
      
    </bug>

</bugzilla>