[plug] Debian Cross compiling

Daniel Foote freefoote at gmail.com
Mon Nov 21 08:39:40 WST 2005


Hello...

Now that I'm the proud owner of a 64Bit AMD chip (for two days now)
I'm sure I'll run into this more often.

Some of the AMD64 developers for Debian have written a HOWTO for AMD64
- have a look at it:
https://alioth.debian.org/docman/view.php/30192/21/debian-amd64-howto.html

It covers more of setting up a 32bit chroot for running stuff that
won't be ported or requires extra libraries that you can't get
normally. The HOWTO also includes some very clever stuff that tells
you how to set up the chroot to be almost completely transparent when
running things. Very neat.

It seems that installing ia32-libs "makes most things work", but that
would be things that are already compiled and 32bit. (I don't think
they are dev files).

I installed the chroot on my machine yesterday, and set up the
transparent execution trick. It seems to work quite well. I'll fiddle
with it more when I get X on the machine... (but that's another
story).

I hope this helps.

Daniel.

On 11/20/05, Cameron Patrick <cameron at patrick.wattle.id.au> wrote:
> Timothy White wrote:
>
> > I want to start cross compiling from AMD64 to i386. Someone said to
> > use linux32, but that only tricks tools into thinking they are running
> > on a x86 and not a x86_64.
>
> > Anyone know an easier way? Or want to try and help?
>
> The amd64 gcc shipped with Debian and Ubuntu accept a -m32 option to
> generate 32-bit code.  However you'll need 32-bit libraries installed
> somewhere that gcc can find them, which doesn't appear to be the case
> by default on an Ubuntu system.  My 32-bit Debian system generates
> AMD64 binaries properly with "gcc -m64" so presumably if you used a
> real OS you could just use gcc -m32 to do the reverse on amd64.
>
> In general, it's probably easier to use a 32-bit chroot and build
> there.  There are lots of resources around the internet about setting
> these up in a sane way.
>
> Cameron
> _______________________________________________
> PLUG discussion list: plug at plug.org.au
> http://www.plug.org.au/mailman/listinfo/plug
> Committee e-mail: committee at plug.linux.org.au
>



More information about the plug mailing list