RE: 64-bit, 10.5/10.4, SDK build settings
RE: 64-bit, 10.5/10.4, SDK build settings
- Subject: RE: 64-bit, 10.5/10.4, SDK build settings
- From: Alex Sheh <email@hidden>
- Date: Tue, 2 Jun 2009 11:13:19 -0700
- Acceptlanguage: en-US
- Thread-topic: 64-bit, 10.5/10.4, SDK build settings
Thanks for the replies, Shawn.
I was considering using the below settings. This way, on ppc and x86, I wouldn't have to put additional runtime checks for function availability (since the ppc and x86 binaries would be building against 10.4 as well as deploying on 10.4).
SDKROOT = macosx10.4
SDKROOT[arch=ppc64] = macosx10.5
SDKROOT[arch=x86_64] = macosx10.5
MACOSX_DEPLOYMENT_TARGET = 10.4
MACOSX_DEPLOYMENT_TARGET[arch=ppc64] = 10.5
MACOSX_DEPLOYMENT_TARGET[arch=x86_64] = 10.5
But with respect to the below settings, doesn't this mean that on ppc64 and x86_64, the software would only run on 10.5 or later? We need to support 10.4 or later on ppc64 and x86_64.
MACOSX_DEPLOYMENT_TARGET[arch=ppc64] = 10.5
MACOSX_DEPLOYMENT_TARGET[arch=x86_64] = 10.5
However, I'm unable to use the below settings, because if I build against the 10.5 SDK, Xcode warns me that there is a new Objective-C ABI that requires me to deploy on 10.5 or later. If I ignored this warning, I figured that my program would exhibit unexpected behavior when accessing the Objective-C runtime on 10.4. If I only needed a handful of functions from a particular framework in the 10.5 SDK, then I would set the deployment target to 10.4 (minimum target) and just check for function availability (i.e. 10.5 availability) at runtime, but it's the entire Objective-C ABI that has changed. At the same time, I need to build against 10.5 SDK, because I need to build a 64-bit binary.
SDKROOT[arch=ppc64] = macosx10.5
SDKROOT[arch=x86_64] = macosx10.5
MACOSX_DEPLOYMENT_TARGET[arch=ppc64] = 10.4
MACOSX_DEPLOYMENT_TARGET[arch=x86_64] = 10.4
Thanks,
Alex
-----Original Message-----
From: Shawn Erickson [mailto:email@hidden]
Sent: Monday, June 01, 2009 7:09 PM
To: Alex Sheh
Cc: Xcode List
Subject: Re: 64-bit, 10.5/10.4, SDK build settings
On Mon, Jun 1, 2009 at 7:00 PM, Shawn Erickson <email@hidden> wrote:
> On Mon, Jun 1, 2009 at 6:37 PM, Alex Sheh <email@hidden> wrote:
>> Thanks for the links, I've already read those documents regarding conditional build settings. Those were the conditional build settings that I was referring to in my original posting.
>>
>> The conditional build settings are architecture-specific and base SDK specific (the SDK that the code is built against), rather than conditional upon the user's OS. The problem is that for PowerPC 64-bit and Intel 64-bit, I need to run a 64-bit binary (the one that was built against 10.5 SDK) when the user is running Leopard 10.5, and I need to run the 32-bit binary (the one built against 10.4 SDK) when the user is running Tiger 10.4.
>
> Make the SDK conditional based on architecture. Basically copy and
> paste the following into your build settings for the target.
>
> SDKROOT = macosx10.4
> SDKROOT[arch=ppc64] = macosx10.5
> SDKROOT[arch=x86_64] = macosx10.5
Of course I do the following which allows my 32 and 64 binary segments to use 10.5 API when running on a 10.5 system while still being able to run on a 10.4 system. Just need to make sure that you check for the availability of 10.5+ specific API (at runtime) before you use them since your 32b binary segments code be run on a 10.4 system.
Again just copy and paste...
SDKROOT = macosx10.5
MACOSX_DEPLOYMENT_TARGET = 10.4
MACOSX_DEPLOYMENT_TARGET[arch=ppc64] = 10.5 MACOSX_DEPLOYMENT_TARGET[arch=x86_64] = 10.5
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >64-bit, 10.5/10.4, SDK build settings (From: Alex Sheh <email@hidden>) |
| >Re: 64-bit, 10.5/10.4, SDK build settings (From: Ken Thomases <email@hidden>) |
| >RE: 64-bit, 10.5/10.4, SDK build settings (From: Alex Sheh <email@hidden>) |
| >Re: 64-bit, 10.5/10.4, SDK build settings (From: Shawn Erickson <email@hidden>) |
| >Re: 64-bit, 10.5/10.4, SDK build settings (From: Shawn Erickson <email@hidden>) |