From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5392,b77a8fbcd0760f0f X-Google-Attributes: gidf5392,public X-Google-Thread: ff9be,b77a8fbcd0760f0f X-Google-Attributes: gidff9be,public X-Google-Thread: f9382,b77a8fbcd0760f0f X-Google-Attributes: gidf9382,public X-Google-Thread: 111c93,b77a8fbcd0760f0f X-Google-Attributes: gid111c93,public From: michal@gortel.phys.ualberta.ca (Michal Jaegermann) Subject: Re: Q: Is it possible to compile binaries for a different processor? Date: 1999/04/16 Message-ID: <7f68ii$k98$1@pulp.ucs.ualberta.ca>#1/1 X-Deja-AN: 466972365 References: <37168eea.69605890@news.yec1.on.wave.home.com> Followup-To: comp.os.linux.development.system,comp.os.linux.alpha,comp.os.linux.questions,comp.os.linux Organization: Disorganized Bits Reply-To: michal@phys.ualberta.ca Newsgroups: comp.os.linux.development.system,comp.os.linux.alpha,comp.os.linux.questions,comp.os.linux Chris Gahan (cgahan@geocities.com) wrote: : I was wondering if it is indeed possible to compile x86 binaries, for : example, on an Alpha. This should be quite easy. gcc had a cross-compilation support for "always" and I still have around a gcc cross-compiler for producing Atari ST code. :-) The biggest drag is a set of tools (like 'nm' or 'ar' and linker) which run on the host computer but operate on binaries of an intended target and, of course, a set of your target libraries to link with. Going the other direction (to cross-compile on x86 for Alpha) seems to be impossible, or at least very hard, as cross-compiler performs various arithmetic operations in a target arithmetic and gcc currently assumes that it can fit them in a host registers. Registers on Alpha are twice a width of those on Intel. Now the good question would be why anybody would really want to set such cross-compiler? Intel boxes are all over the place, quite a few of them rather fast, and creating the whole cross-compilation environment (not only a cross-compiler itself) is maybe not hard, with all this support which is already in place, but rather tedious project. Michal