On 19/07/2007, at 3:36 AM, Chris Espinosa wrote:
Well, whatever you think MACOSX_DEPLOYMENT_TARGET is set to, the linker is being told it's 10.1 (which is the default when it's not set at all.)
I realise that. Trust me, it is set to 10.3 in XCode.
Just after the MasterObjectLink stage, there's a Libtool stage:
Libtool … normal ppc
cd …
setenv MACOSX_DEPLOYMENT_TARGET 10.3
/usr/bin/libtool -static -arch_only ppc -o … -L… -filelist … -syslibroot /Developer/SDKs/MacOSX10.4u.sdk
The MasterObjectLink stage looks like:
MasterObjectLink …
cd …
/usr/bin/ld -r -arch ppc … -o …
/usr/bin/ld: warning weak symbol references not set in output with MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1
/usr/bin/ld: warning weak referenced symbols:
_NSCocoaErrorDomain
_NSFilePathErrorKey
_NSLocalizedFailureReasonErrorKey
_NSLocalizedRecoveryOptionsErrorKey
_NSLocalizedRecoverySuggestionErrorKey
_NSRecoveryAttempterErrorKey
_NSStringEncodingErrorKey
_NSURLErrorKey
_NSUnderlyingErrorKey
So it looks like XCode is forgetting to set the deployment target environment variable for the MasterObjectLink stage.
I've managed to workaround the problem by adding -macosx_version_min 10.3 to Single-Object Prelink Flags.
- Chris