export CFLAGS=-m32
$ gcc test.c -o testc
$ file testc
testc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
$ ldd testc
linux-vdso.so.1 => (0x00007fff227ff000)
libc.so.6 => /lib64/libc.so.6 (0x000000391f000000)
/lib64/ld-linux-x86-64.so.2 (0x000000391ec00000)
$ gcc -m32 test.c -o testc
$ file testc
testc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
$ ldd testc
linux-gate.so.1 => (0x009aa000)
libc.so.6 => /lib/libc.so.6 (0x00780000)
/lib/ld-linux.so.2 (0x0075b000)
要するに:-m32 を使用します 32 ビット バイナリをコンパイルするためのフラグ。
また、必要なすべてのライブラリの 32 ビット バージョンがインストールされていることを確認してください (私の場合、Fedora で必要だったのは glibc-devel.i386 だけでした)