views:

50

answers:

2

I'm using a 64bit system but want a set of 32bit binaries. What options must I pass to a configure script to generate a 32bit/x86 makefile?

+1  A: 

Assuming gcc/g++:

CPPFLAGS=-m32 ./configure ...
R Samuel Klatchko
Thanks for the answer. The configure script still sets the build system type and host system type to x86_64-unknown-linux-gnu. Do you know how to override these?
Jack Nock
A: 

Passing the following argument to configure script allowed me to build the 32bit library on 64bit Linux

./configure --build=i686-pc-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"
Jack Nock

related questions