• 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: Per-architecture -D options?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Per-architecture -D options?


  • Subject: Re: Per-architecture -D options?
  • From: "James Larcombe" <email@hidden>
  • Date: Fri, 10 Feb 2006 16:56:42 -0000

Dave McCaldon wrote:

Is there a way to have architecture specific -D options, for example:

gcc .... -DMY_BIG_ENDIAN_ppc -DMY_LITTLE_ENDIAN_i386

Which will turn into -DMY_BIG_ENDIAN for PPC and -DMY_LITTLE_ENDIAN for Intel?

I'm trying to avoid having to change any code (we have lots of source files ...)!

Do you have a prefix file? If so you could use something like this:

#ifdef __LITTLE_ENDIAN__
   #define MY_LITTLE_ENDIAN
#endif

and so on...

__LITTLE_ENDIAN__ and __BIG_ENDIAN__ are built-in to GCC I think.

James
_______________________________________________
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: Per-architecture -D options?
      • From: Eric Albert <email@hidden>
References: 
 >Per-architecture -D options? (From: Dave McCaldon <email@hidden>)

  • Prev by Date: Re: Per-architecture -D options?
  • Next by Date: Altivec Framewok with XCode 2.2.1
  • Previous by thread: Re: Per-architecture -D options?
  • Next by thread: Re: Per-architecture -D options?
  • Index(es):
    • Date
    • Thread