Re: [AD] OS X universal binaries

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Jul 7, 2007, at 10:03 PM, Matthew Leverton wrote:
Yeah, and then it glues the files together.

Matthew,
Thanks for commenting about the non-support for earlier versions of OS X in Allegro's build system. I've run into this problem in the past. My workaround was to just build to liballegs, and then use lipo on the final products instead of on each .o object file[1]. But I think your way is cleaner!

gcc 4 (at least, last I
knew) doesn't create OS X 10.3 compatible builds.

Not quite. According to Apple's docs[2], C code built with gcc 4 should run on 10.3.9 as long as you target the 10.3 SDK. (It will *not* run on earlier 10.3.x!) We still may want to build with gcc 3.3 and target 10.2, however.

So I'd love to see your gcc-uni.sh script. I've seen previous efforts to unify multi-arch builds like this, and a few problems can crop up. Most of these issues aren't relevant to the case of Allegro[3], but there are three I'd like to check:

- Is the script aware of SDKs, including flags like -isysroot and - syslibroot? - Is the script aware of the different arguments available to different versions of gcc? - Does the script attempt to share preprocessor output between arches? This can break because of arch-dependent #define's.

Dave



[1] Very non-automated instructions: http://vasi.dyndns.org:3128/ files/ports/lw

[2] http://developer.apple.com/documentation/DeveloperTools/ Conceptual/cross_development/UniversalBinaries/chapter_4_section_1.html

[3] If you're interested, the common issues that shouldn't be relevant for Allegro are:
- MACOSX_DEPLOYMENT_TARGET
- configure scripts giving different answers for different arches
- files that compile for just one arch





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/