Simon McVittie <email@example.com> writes:
> On 28/06/12 10:17, Goswin von Brederlow wrote:
>> Say I want to have the build-essential for i386 installed on amd64.
>> I could install build-essential:i386, replacing gcc/g++:amd64 with
>> gcc/g++:i386. Wouldn't that give me everything needed to cross-compile
>> for i386?
> For evolutions of the same CPU family (i386 vs amd64, powerpc vs
> powerpc64) this sort of works, but after you've installed gcc:i386, you
> can't compile 64-bit code any more (until you reinstall gcc:amd64). That
> means that in practice you use a chroot for 32-bit compilation, and if
> you're doing that, it might as well be a purely i386 chroot that doesn't
> use multiarch.
> For "real" cross-compiling - amd64 vs armel, say - you don't really want
> to be running an armel gcc binary that emits armel machine code (which
> is what gcc:armel is) under qemu emulation: it's technically possible,
> but your build will be rather slow. What you want is an amd64 gcc binary
> that emits armel machine code, which is what gcc-cross-armel:amd64 contains.
Obviously. That's why I refined the idea in the next lines.