[X-Unix] compiling "universal" commandline utilities?

TjL luomat at gmail.com
Thu Apr 30 08:12:26 PDT 2009


I'm using my Powerbook again, which means that I'm realizing that a
lot of my utilities that I've compiled were compiled on my iMac.

I'd like to compile them as both PowerPC and Intel but I'm not sure
how to do that.

Someone on the Zsh list suggested this:

make CFLAGS='-arch i386 -arch ppc -arch ppc64' LDFLAGS='${CFLAGS}'

but when I tried to compile Gnu Sed it failed:

if gcc -DHAVE_CONFIG_H -I. -I. -I..  -I../lib -I../intl -I.. -I../lib
-I../intl   -arch i386 -arch ppc -arch ppc64 -MT getopt1.o -MD -MP -MF
".deps/getopt1.Tpo" -c -o getopt1.o getopt1.c; \
        then mv -f ".deps/getopt1.Tpo" ".deps/getopt1.Po"; else rm -f
".deps/getopt1.Tpo"; exit 1; fi
gcc-4.0: -E, -S, -save-temps and -M options are not allowed with
multiple -arch flags
make[2]: *** [getopt1.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
[1]    75357 exit 2     make CFLAGS='-arch i386 -arch ppc -arch ppc64'
LDFLAGS='${CFLAGS}'
%
-

So I'm wondering: is there a way to do this?

Google was no help.

TjL


More information about the X-Unix mailing list