Re: sysctl.proc_exec_affinity to force launching of 32-bit flavor?
Re: sysctl.proc_exec_affinity to force launching of 32-bit flavor?
- Subject: Re: sysctl.proc_exec_affinity to force launching of 32-bit flavor?
- From: Clark Cox <email@hidden>
- Date: Fri, 13 Mar 2009 15:09:30 -0700
On Fri, Mar 13, 2009 at 2:36 PM, Terry Lambert <email@hidden> wrote:
> On Mar 12, 2009, at 6:38 PM, Eric Gouriou wrote:
>>
>> On Mar 12, 2009, at 5:54 AM, Jim Correia wrote:
>>>
> [...]
>>>
>>> It looks like using posix_spawn solves the problem. (Previously I was
>>> using fork/exec because the code was originally written to target 10.4.x.)
>>
>> In addition to the various solutions offered in this thread...
>>
>> You can also consider building the various slices of your fat binary with
>> different -mmacos-version-min settings
>> so that, e.g., the 64bit slice will only be running on 10.5 while the
>> 32bit slice is allowed on 10.4 .
>>
>> 32b -mmacosx-version-min=10.4
>> 64b -mmacosx-version-min=10.5
>>
>> Adapt to taste. That's the theory at least, please double-check before
>> committing to that solution.
>
> This won't work.
Yes, it will :)
> The only things I look at in the exec code path when
> grading a binary for preference as to which slice to load is either an
> explicit preference list from posix_spawn, an override for the sysctl for
> Rosetta (PPC emulation), or the cpu_type and cpu_subtype in the Mach-o files
> encapsulated in a fat (Universal) biinary.
64-bit binaries linked for 10.4 and those linked for 10.5 have
different cpu subtypes for this very reason:
<http://developer.apple.com/documentation/Darwin/Conceptual/64bitPorting/building/building.html#//apple_ref/doc/uid/TP40001064-CH208-DontLinkElementID_20>
>
> There's no OS version information in the Mach-o header or the dat container
> header, so it doesn't matter how you link/compile it.
--
Clark S. Cox III
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden