Tagline

Never call a man a fool. Borrow from him.

This is more for me because I know I’ll forget, but I’ve been doing this for little utilities like dd_rescue and cups-pdf for a while so I wanted to put it down for those too lazy to read Apple’s overly-extensive documentation on the topic — and for me when I forget.

One Step

This should work for most programs.

gcc -arch i386 -arch ppc -O3 -o cups-pdf cups-pdf.c

Two Steps

If the one step method fails for any reason, this will work:

  1. Build your project in two versions, one for PPC and one for Intel: gcc -arch ppc -O3 -o cups-pdf.ppc cups-pdf.c gcc -arch i386 -O3 -o cups-pdf.intel cups-pdf.c
  2. Join the two binaries with lipo: lipo -create -arch ppc cups-pdf.ppc -arch i386 cups-pdf.intel -output cups-pdf

All done. Ridiculously easy, no? Open source devs, please hear me: put this option in your configure scripts, off by default. Thanks.

User login