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

Matthew Butch libertyof76 at supernet.com
Sat May 23 09:53:43 PDT 2009


Here is what I do- just do separate arch build (-arch i386 then -arch  
ppc). Then use lipo to put them together (do a man lipo for the  
arguments).

-Matt

On Apr 30, 2009, at 11:12 , TjL wrote:

> 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
> _______________________________________________
> X-Unix mailing list
> X-Unix at listserver.themacintoshguy.com
> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix



--

Matthew Butch

"fiat justicia ruat colelum"
(let justice be done though the heavens may fall)

Sent with Mac OS X Leopard Mail 3.5 (930.5)






More information about the X-Unix mailing list