Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Compiling Zsh for Mac PowerPC and Intel







On Apr 22, 2009, at 8:09 AM, Bart Schaefer wrote:

On Apr 22,  9:31am, TjL wrote:
}
} My question is, how do I compile zsh so I end up with a "universal" binary?

I'm no expert, but "man cc" seems to indicate that you have to pass the
-arch option to the compiler multiple times.

This did it for me:

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

And now:

schaefer[398] file Src/zsh
Src/zsh: Mach-O universal binary with 3 architectures
Src/zsh (for architecture i386):        Mach-O executable i386
Src/zsh (for architecture ppc7400):     Mach-O executable ppc
Src/zsh (for architecture ppc64):       Mach-O 64-bit executable ppc64

I have no idea whether it'll actually *run* on all three platforms.

I compiled on intel and tested it on ppc (both 10.5) and it works as advertised. Haven't tried 64-bit yet, but I am glad to see that it will be this easy...

dev3 compiles fine on ppc and intel 10.5, fwiw.

Bill



William G. Scott

Contact info:
http://chemistry.ucsc.edu/~wgscott/



Messages sorted by: Reverse Date, Date, Thread, Author