[CentOS] On compiling for x86_64 on an i386...

Wed Dec 28 18:14:48 UTC 2005
Johnny Hughes <mailing-lists at hughesjr.com>

On Wed, 2005-12-28 at 19:07 +0100, Maciej Żenczykowski wrote:
> Hi folks,
> 
> Anyway, I have a main development system which is P4 based (without EM64T) 
> and a dozen diskless Athlon 64's.  I'd like to be able to compile 
> kernel's, etc for the Athlons in x86_64 bit mode.  Any idea how to arrange 
> this?
> 
> I've recompiled the src.rpm for binutils (added a single line 
> "CARGS=--enable-targets=x86_64-linux" to the specfile)
> and "as --64" doesn't bork anymore, so I'm assuming I've got that right...
> 
> I'm assuming I next have to do something to gcc?  Haven't figured this out 
> yet... Anything else needed?
> 
> Holiday cheers,
> MaZe.
> _______________________________________________

You can build a cross compiler tool chain ... but that is a real PITA.

It is MUCH easier if you can compile on an x86_64 machine ... maybe in a
chroot

Not building on an x86_64 machine will cause issues with some SRPMS that
look at RPM variables.

It is certainly possible to build a cross compiler tool chain that will
compile "C" files .. but harder to get it to work with rpmbuild :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.centos.org/pipermail/centos/attachments/20051228/27488ecb/attachment-0005.sig>