PDA

View Full Version : [SOLVED] compile a 32-big g77 code on AMD64


dimkal
March 6th, 2008, 12:51 PM
is it possible to compile a 32-bit code (using g77) on an AMD64 processor running on an AMD64 Hardy?

dimkal
March 9th, 2008, 06:48 PM
OK i figured this out on my own. You must install the gcc-multilib package, and compile with the -m32 switch...


%> g77 -m32 -o test32 test.f

%> file test32
test32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), not stripped