How do I compile openSSL in 32 bit mode on a 64bit system?

Gary Barker picture Gary Barker · Oct 20, 2011 · Viewed 27.1k times · Source

I have a program that currently has to be compiled in 32 bit mode (for now) and needs to be linked against a version of openSSL with the experimental ciphers included. Therefore I need to compile a 32 bit openSSL. Using

./config -m32 

results in both -m32 and -m64 being included in the compiler flags.

Answer

Gary Barker picture Gary Barker · Oct 27, 2011

The tumbleweed badge reminded me to come back and answer it myself! The way I got this to work was to use:

setarch i386 ./config -m32