• 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: Compiling different prefix headers based on i386 or ppc?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling different prefix headers based on i386 or ppc?


  • Subject: Re: Compiling different prefix headers based on i386 or ppc?
  • From: "Shawn Erickson" <email@hidden>
  • Date: Fri, 6 Oct 2006 15:04:00 -0700

On 10/6/06, Theodore H. Smith <email@hidden> wrote:
Is it possible to have different prefix headers for an i386 or ppc UB
compile?

What's happening, is that my header defines some constant about if we
are little endian or not. but the same header is used both for intel
and ppc, so it is wrong half the time no matter what I set it to.

What can I do?

Have your headers set its internal define about endianess using the one provided by the compiler.

Is there some standard Xcode target define that tells us that
platform we are on, ppc or intel?

Apple's GCC defines __BIG_ENDIAN__ or __LITTLE_ENDIAN__ depending on the endianess of the architecture you are building for.

You should review Apple documentation on universal binary programming,
it covers all these topics...

<http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_intro/chapter_1_section_1.html>

-Shawn
_______________________________________________
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


References: 
 >Compiling different prefix headers based on i386 or ppc? (From: "Theodore H. Smith" <email@hidden>)

  • Prev by Date: Compiling different prefix headers based on i386 or ppc?
  • Next by Date: Re: Xcode always rebuilds all for project on external volume
  • Previous by thread: Compiling different prefix headers based on i386 or ppc?
  • Next by thread: invalid conversion from void* to void**
  • Index(es):
    • Date
    • Thread