• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Help : Compiling for multiple architectures, is ppc970 valid ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help : Compiling for multiple architectures, is ppc970 valid ?


  • Subject: Re: Help : Compiling for multiple architectures, is ppc970 valid ?
  • From: Peter <email@hidden>
  • Date: Fri, 14 Apr 2006 09:48:38 +0800

I have tested all the combination of XCode settings for ppc970. This is for my existing Cocoa project which BTW have been compiled all along for two binaries (generic powerpc and powerpc G5) on the older XCode 1.x.

Here is my findings,

0) As mention before, there is no need for full fledge 64 bit binary (ppc64), 32 bit is good enough. Anyway 64 bit binary is for command line only, not really useful in my case. However ppc970 mode is useful to squeeze out extra speed out of G5 CPU.

1) ppc970 setting works on XCode version 2.2.1 (earlier I mistype version 2.1), however it does not have the required gcc optimize parameters for G5 CPU instruction. The settings for G5 code (see below) still stands & works.

-mcpu=970 -mpowerpc64 -mpowerpc-gpopt -force_cpusubtype_ALL -DCPUG5

2) Instead of build one universal binary, as before I have to build 2 binaries (ppc & ppc970) separately, since I can not specified different parameters for each architecture on XCode. Manually on command line, I use lipo to stitch both binaries into one. I think this is one of the weakness in XCode. In future, I might set up multiple targets and batch file to do this tedious step.

3) The binaries works on G4 and G5, tested on OS 10.3.9 and 10.4.x. The conditional macro -DCPUG5 allows the program to know which code it is running powerpc or g5 code.

Now I wonder if Leopard supports ppc970 ?

I would like to make some suggestions to XCode people, anyone knows what is their e-mail address ?

Thanks again for the replies.


Peter.


On Apr 13, 2006, at 5:16 PM, Peter wrote:

All the while I thought there can be 3 settings as in Apple's document, ppc, ppc64 and i386 at XCode Architectures settings. Recently I found out that about ppc970 setting at the end of an XCode compile session.

setenv VALID_ARCHS "m68k i386 sparc hppa ppc ppc7400 ppc970 ppc64"

My intention is to build 3 binaries into 1, that is generic PowerPC, PowerPC G5 and Intel. All binaries are targeted for 32 bit. Since there is no additional documentations, I hope some one can answer my questions,

1) is ppc970 setting valid under XCode 2.1 ?

2) I would like to put extra settings for compiling G5 code,

 -mcpu=970 -mpowerpc64 -mpowerpc-gpopt -force_cpusubtype_ALL -DCPUG5

where can I put this settings or it is obsolete ?

3) When the binary is launch, how does the program process knows which binary it is running (ppc, ppc970 or i386) ?
I want to put a text on the about box showing which binary it is running.


4) Does this means I can only use 10.4 sdk (not 10.3.9 or lower) and final binary must run on OS 10.4.x ?

Thanks for answering my questions.

Peter.



_______________________________________________ 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
  • Follow-Ups:
    • Re: Help : Compiling for multiple architectures, is ppc970 valid ?
      • From: Eric Albert <email@hidden>
    • Re: Help : Compiling for multiple architectures, is ppc970 valid ?
      • From: Kay Roepke <email@hidden>
References: 
 >Help : Compiling for multiple architectures, is ppc970 valid ? (From: Peter <email@hidden>)

  • Prev by Date: Re: Universal ICU build
  • Next by Date: Re: Help : Compiling for multiple architectures, is ppc970 valid ?
  • Previous by thread: Re: Help : Compiling for multiple architectures, is ppc970 valid ?
  • Next by thread: Re: Help : Compiling for multiple architectures, is ppc970 valid ?
  • Index(es):
    • Date
    • Thread