To develop binaries for the other architecture on a
biarch architecture, the respective libraries for the second
architecture must additionally be installed. These packages
are called rpmname-32bit
.
You also need the respective headers and libraries from the rpmname-devel
packages and the development
libraries for the second architecture from rpmname-devel-32bit
.
Most Open Source programs use an autoconf-based program configuration. To use autoconf for configuring a program for the second architecture, overwrite the normal compiler and linker settings of autoconf by running the configure script with additional environment variables.
The following example refers to an AMD64 or EM64T system with x86 as the second architecture:
Set autoconf to use the 32-bit compiler:
CC="gcc -m32"
Instruct the linker to process 32-bit objects:
LD="ld -m elf64_i386"
Set the assembler to generate 32-bit objects:
AS="gcc -c -m32"
Determine that the libraries for libtool and so
on come from /usr/lib
:
LDFLAGS="-L/usr/lib"
Determine that the libraries are stored in the
lib
subdirectory:
--libdir=/usr/lib
Determine that the 32-bit X libraries are used:
--x-libraries=/usr/X11R6/lib/
Not all of these variables are needed for every program. Adapt them to the respective program.
CC="gcc -m64" \ LDFLAGS="-L/usr/lib64;" \ .configure \ --prefix=/usr \ --libdir=/usr/lib64 make make install