Cool xcode trick to make universal binaries

Dan Gezelter gezelter at nd.edu
Mon Jun 13 09:22:34 EST 2005


% cat junk.c
#include <stdio.h>
main() {

   printf("hello, world!\n");

}
% setenv SDK /Developer/SDKs/MacOSX10.4u.sdk
% gcc -isysroot ${SDK} -arch ppc -arch ppc64 -arch i386 -Wl,- 
syslibroot,${SDK} junk.c
% file a.out
a.out: Mach-O fat file with 3 architectures
a.out (for architecture ppc):   Mach-O executable ppc
a.out (for architecture ppc64): Mach-O 64-bit executable ppc64
a.out (for architecture i386):  Mach-O executable i386






More information about the Openmd-developers mailing list