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: Greg Guerin <email@hidden>
- Date: Tue, 2 Jun 2009 22:12:43 -0700
Alex Sheh wrote:
Thank you, Greg. This is the source of my confusion. I thought
each CPU would execute only one of the following binaries (based on
the CPU type): ppc, ppc64, i386, or x86_64. But apparently this is
not the case.
Correct: this is not the case.
You're also neglecting the fact that Intel CPUs (i386 or x86_64) will
run a ppc or ppc7400 executable if no other executable is available.
They do this using the Rosetta emulator. Note that ppc64, however,
is NOT accepted by Rosetta, and will not be emulated.
User owns a PowerPC G5 running 10.4 (Tiger).
- I assumed that the the fat binary's ppc64 binary would execute,
since the PowerPC G5 hardware is 64-bit capable. But if the system
knows to execute the ppc binary here, launching the 32-bit Cocoa
plugin, then this is exactly what I want to happen.
Correct.
User owns a PowerPC G5 running 10.5 (Leopard).
- The fat binary's ppc64 binary will execute, launching the 64-bit
Cocoa plugin; this is what I want as well.
That's the default, but the user can change this. In particular, the
user can check the "Open in 32 Bit Mode" checkbox, which will then
run the 32-bit version.
You can see this checkbox by doing "Get Info" on Chess.app (one of
the few apps in a standard install that 64-bit and 32-bit code). I
recommend you play with this. I also recommend that you run Activity
Monitor.app and observe what the "Kind" column tells you about 64-bit
execution.
I have no idea what you mean by "32-bit Cocoa plugin" or "64-bit
Cocoa plugin". Perhaps you mean library or framework, I can't tell.
And Cocoa is a framework and library, not a plugin.
A plugin defines a particular relationship to a host app, and I'm
afraid that the architectures must be identical. So if the host app
is 32-bit ppc, then the plugins must also be 32-bit ppc (even if the
"ppc" is being emulated). Or if the host app is 64-bit, then its
plugins must also be 64-bit.
I didn't know a 64-bit capable MacOSX 10.4, running on a 64-bit
capable CPU, would know to launch the 32-bit version of the Cocoa
plugin. But I guess that MacOSX 10.4 has some higher level logic
that knows to select the ppc version, and I guess it makes this
determination because it knows that the ppc64 binary would require
the 10.5 Objective-C runtime (which is not available)?
It's not that OS 10.4 has higher level logic. It's that there's no
such thing as ppc64 executables on 10.4. The whole idea of "64-bit
capable MacOSX 10.4" is simply mistaken. (There are limited cases
where ppc64 *is* executable on OS 10.4, but for the most part there
isn't, so that's really the way you should think of it. In
particular, there is no 64-bit Objective-C on 10.4, which means no 64-
bit Cocoa, no 64-bit GUI apps, etc.)
You seem to be under the impression that a 64-bit CPU implies that
the OS and/or the application's executable must also be 64-bit. That
is simply wrong. Or perhaps the presence of a 64-bit CPU
automatically makes the OS and frameworks run in 64-bit mode. That
is also wrong.
The only way you can even *create* a usable ppc64 binary is under
10.5. If you removed the 32-bit ppc slice and tried to run your UB
app on a G5 under 10.4, it would simply fail to start, because
there's no executable that 10.4 will even find. The OS is the
controlling factor here, not the CPU arch. You might as well have
compiled a 32-bit ARM executable, or tried to run the i386 slice on
that G5, it would be just as usable (i.e. not at all).
-- GG
_______________________________________________
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