Subject: Re: [Boost-build] [Mac XCode 3.1.1][boost_1_37_0] use MaxOSX10.4u.sdk
From: Phillip Seaver (phil_at_[hidden])
Date: 2008-11-11 10:09:12
Michael Jackson wrote:
> On Nov 11, 2008, at 8:19 AM, Jeff Flinn wrote:
>> How do I specify that the osx 10.4 universal sdk is used when building
>> boost_1_37_0 on Max OSX 10.5.5 and XCode 3.1.1.
>> bjam --toolset=darwin architecture=combined link=static debug release
>> uses the 10.5 sdk, which causes problems when our app links with
>> Thanks, Jeff
> Interesting, What issues are you having with the link stage? By using
> the 10.4uSDK you are basically saying that your application should
> only work on 10.4. If it works on 10.5 you are lucky.
> If you want to be able to run on 10.4 and 10.5 then you need to set
> the SDK to 10.5 but the deployment target to 10.4 so that GCC performs
> weak linking to the SDKs.
> from the following web page:
> Adjusting the SDK value has this effect.
> "The name or path of the base SDK being used during the build. The
> product will be built against the headers and libraries located inside
> the indicated SDK. This path will be prepended to all search paths,
> and will be passed through the environment to the compiler and linker."
> And for deployment target:
> "Code will load on this and later versions of Mac OS X. Framework APIs
> that are unavailable in earlier versions will be weak-linked; your
> code should check for null function pointers or specific system
> versions before calling newer APIs." This can be set by using the
> "-mmacosx-version-min" flag, as in -mmacosx-version-min=10.4
My understanding is that by using an SDK, you're saying that I want to
use API's from that version of OS X and earlier. If you set your
deployment target (via -mmacosx-version-min), you're saying that you
want to support that version of OS X and later. If they differ (e.g.,
10.4u SDK and deployment of 10.3, you have to check for the presence of
the 10.4 API's at run time):
I've significantly changed the version of the darwin toolset we use here
because we were targeting 10.3, which requires using gcc 3.3. There are
features to control SDK and deployment target, and it automatically
chooses which gcc to use based on those features (plus architecture).
Unfortunately, I haven't been able to devote as much time as I'd like to
it, so I haven't figured out generators well enough to handle building
the architectures separately then using "lipo" to make a universal lib
or executable. I've thought about posting it, but I've wanted to try to
clean it up a bit more and add some comments. :-)
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk