I have an old tool that need recompiling on Mac OSX 10.9.2, but the tool was written (not by me) with 32 bit assumptions, and a pure 64 bit compile won't work without rewriting.
Is it possible to use Macports gcc (4.3) and the -m32 flag? Will a 32 bit binary run on the 64 bit kernel of Mac OSX 10.9.2?
I tried using the option with a simple helloworld.c file and get errors and have not found explanations on the web:
%> gcc-mp-4.3 -m32 hello.c
ld: warning: ld: warning: ignoring file /opt/local/lib/gcc43/libgcc_s.10.5.dylib, missing required architecture i386 in file /opt/local/lib/gcc43/libgcc_s.10.5.dylib (1 slices)
ignoring file /opt/local/lib/gcc43/gcc/x86_64-apple-darwin13/4.3.6/libgcc.a, file was built for archive which is not the architecture being linked (i386): /opt/local/lib/gcc43/gcc/x86_64-apple-darwin13/4.3.6/libgcc.a
Note: native Xcode gcc is not compatible with the source since Xcode gcc is clang based.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…