6.3 Software Compilation on Biarch
Platforms
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 conguration. To use
autoconf for conguring 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 x86_64 system with x86 as the second architecture.
1
Use the 32-bit compiler:
CC="gcc -m32"
2
Instruct the linker to process 32-bit objects (always use gcc as the linker front-end):
LD="gcc -m32"
3
Set the assembler to generate 32-bit objects:
AS="gcc -c -m32"
4
Specify linker ags, such as the location of 32-bit libraries, for example:
LDFLAGS="-L/usr/lib"
5
Specify the location for the 32-bit object code libraries:
--libdir=/usr/lib
6
Specify the location for the 32-bit X libraries:
--x-libraries=/usr/lib
32-Bit and 64-Bit Applications in a 64-Bit System Environment 125