Re: Cross OS version UB development
Re: Cross OS version UB development
- Subject: Re: Cross OS version UB development
- From: Greg Guerin <email@hidden>
- Date: Sat, 24 Feb 2007 13:00:39 -0700
I wrote:
>That man page lists quite a few ppc* subtype names, which I couldn't get
>them to work.
I just tried this in Xcode, adding "ppc7400" to $ARCHS, and it worked. I
don't know why it didn't work when I tried this before, but it seems to
work now.
It compiled an executable for the ppc7400, which is the G4 CPU in my old
graphite dual-G4 box. In the same target, I also compiled generic ppc and
i386, so there are 3 "architectures" in the fat-macho executable.
So if you use the right CPU-subtype name for the G5, it should compile code
specific to the G5, and put it in a G5-only section in the binary.
One would also have to use the per-arch flags in Xcode, because I don't
think any compiler symbols like __g5__ (or whatever it is) are
automatically set when you specify a CPU-subtype as the architecture.
By the way, you can enter this command on the G5 to find out what it's
CPU-specific arch-name is:
machine
See 'man 1 arch' and 'man 1 machine'.
Also try:
sysctl hw.cputype hw.cpusubtype
which will be numbers, not names, but they should correlate to the #include
file referenced by 'man 3 arch'.
-- 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