[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

amd64/gcc-3.4 archive: multilib/-m32 support available (compilation of 32bit i386-binaries)

The amd64/gcc-3.4 archive (http://debian-amd64.alioth.debian.org/gcc-3.4)
finally supports the compilation and linking of 32bit i386 binaries
using the gcc '-m32' switch. The gcc-3.4 package in the amd64/gcc-3.4 
archive has been recompiled with the '--enable-multilib' option 
which causes all the necessary libraries and files for 32bit i386 
development with gcc to be created. 

The amd64/gcc-3.4 archive also has additional 32bit 'libc6-i386' and 
'libc6-dev-i386' packages which are created by the 'glibc' source package 
using the multilib-enabled gcc-3.4 compiler. These 32bit libc6 packages
are needed to build the multilib enabled gcc-3.4 compiler itself.

All 32bit libraries and files are placed in the '/lib/i486-linux' and 
'/usr/lib/i486-linux' directories by those packages.

Basically, 32bit development on amd64/gcc-3.4 is now as easy as this:

# apt-get install gcc
# apt-get install gcc-3.4-i386
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  libc6-dev-i386 libc6-i386
# gcc -m32 hello.c
# ./a.out
Hello world

This also means that packages like 'grub', which are 32bit-based,
can now be compiled directly in an amd64 environment. All it needs is
an additional Build-Depends on 'gcc-3.4-i386' (and the amd64-specific
grub-patch, of course).

The relevant patches to the 'gcc-3.4' and 'glibc' packages can be found at

Andreas Jochens

Reply to: