Jack's answer is not complete.
You need compiler support / libc for 32-bit compilation. On some distributions, such as Ubuntu, you need to install the gcc-multilib and / or g++-multilib :
sudo apt-get install gcc-multilib g++-multilib
Then you can invoke configure, as you said, to specify a 32-bit host and pass 32-bit flag flag compilations:
./configure --host=i686-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"
If you do not have multilib installed, you will receive an error message, for example configure: error: C compiler cannot create executables when passing the -m32 flag.
volpato Jul 19 '13 at 14:03 2013-07-19 14:03
source share