Christina Wang wrote:
I'm trying to build 32 bit gcc4.1.0 on a 64 bit machine(FC3 with intel
x86_64EMT processors). The default mode of the generated compiler is
always 64 bit. I tried "--enable-targets=m32" in the configuration
stage, but it doesn't work. With a 64 bit processor, how can I build 32
bit gcc or bi-arch but the default mode is 32 bit?
I thought you automatically got a 32bit target support enabled, but
64bit by default.
Have you ruled out the GCC "-m32" option for your needs ?
$ gcc -o a.out -m32 helloworld.c
$ file a.out
$ ldd a.out
$ file /lib/libc-2.3.5.so
$ file /lib64/libc-2.3.5.so
On my FC4 installation I get a 32bit ELF executable, linked against the
32bit versions of all DSOs from /lib and /usr/lib rather than /lib64 and
/usr/lib64.
If you are using authconf, then:
$ export CFLAGS="-m32"
$ ./configure
Will often build 32bit versions of applications.
Darryl L. Miles