site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=u7Igq0moLL2C4giD02Zwf2uld/fbQrMzj0BGKFW6inY=; b=mZ0WueDAhfWSo7+G6WPpkx2VxJndXurAdr9GqziV+Hvg/jlNITUupEG9fyVA0xnSlY OnZDAcOpCFk/eqZ4tpdbds79qJL/TWPRwXZ9gSlVPqe4Jcjk1OM6kwhyb88kG2+2obcK tEFkphGZHBorhb4GoqA4mW1+jVt3vKkYywFTw= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=mDy8KF4BoaDve6QgSuLGpBQrElQd0KvUy+XKSDgx4uZxFcf9pw9mOjwvrFDsG4QXA2 6IJiCVXkaS3pH8zTP7eg1A1TavEp0J1/AKkU5Zk3sYp6ZDrlH+7FSlKBUz+cQvs7W9H6 76iTU44ZYgVhmP3H4HAnmZuODxSiYa09iuLRk= On Fri, Mar 13, 2009 at 2:36 PM, Terry Lambert <tlambert@apple.com> 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 clarkcox3@gmail.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com