Ryan Govostes on Tue, 24 Apr 2007 23:33:04 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Mac OS Cross-compiling

I use a PPC Mac but I've needed to build libpari for i386-based Macs, too. Unfortunately, it required a bit of tweaking to get this to work. I think the configure script needs to be updated so that these changes aren't necessary.

I haven't tested the reverse process (building for PPC on an i386 Mac).


config/arch-osname always returns the current computer's architecture and OS type, even if the user specifies a different host via the -- host option on the configuration script.

In order to build for i386-darwin, I replaced this file with a single line:

echo i386-darwin


./Configure --host=i386-darwin


Now the CC_FLAVOR variable has to be changed in the Odarwin-i386/ Makefile. First, you have to specify the architecture to build for, and also the SDK root for all system files.

CC_FLAVOR  = -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk


Continue building as regular...

Ryan Govostes