• 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: iPhone Platform Compiler Symbol?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iPhone Platform Compiler Symbol?


  • Subject: Re: iPhone Platform Compiler Symbol?
  • From: Philip Aker <email@hidden>
  • Date: Thu, 14 May 2009 19:14:29 -0700

On 2009-05-14, at 18:18:14, Gwynne Raskind wrote:

On May 14, 2009, at 8:54 PM, Philip Aker wrote:
# gcc -dM -E -x c /dev/null > gccdefs.txt


and


# cpp -dM < /dev/null > cppdefs.txt


Show no difference in the output files.
I think cpp is currently a call through to gcc so theoretically they should always produce the same set of defines given equivalent options.



True or false?

True, though the whole story is slightly more complicated. A little fiddling about with the -v flag actually shows the following:

1. cpp is a wrapper for gcc-4.0 -E
2. gcc-4.0 -E in turn calls through to cc1 -E -traditional-cpp
3. cpp-4.2 and gcc-4.2 call through to cc1 -E

On 2009-05-14, at 18:38:58, Peter O'Gorman wrote:

At the risk of really annoying Chris...

/usr/bin/cpp is a shell script that does indeed end up calling
/usr/bin/gcc -E -x c, the differences are, cpp does not take -arch flags
(well, it happily takes the -arch flag, but thinks the argument is a
file), and does not do languages other than c, and, in this case, does
not call a completely different cross-compiler.

Thanks for the fine print Gwynne, and Peter. That's what I wanted to get out of the sidebar of the thread.



Anyway, Availability.h really is the right answer.

I hope K. Chen has seen CDE's posts by now.


Philip Aker echo email@hidden@nl | tr a-z@. p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.

_______________________________________________
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: 
 >iPhone Platform Compiler Symbol? (From: "K. Chen" <email@hidden>)
 >Re: iPhone Platform Compiler Symbol? (From: Chris Espinosa <email@hidden>)
 >Re: iPhone Platform Compiler Symbol? (From: Michael Crawford <email@hidden>)
 >Re: iPhone Platform Compiler Symbol? (From: Philip Aker <email@hidden>)
 >Re: iPhone Platform Compiler Symbol? (From: Peter O'Gorman <email@hidden>)
 >Re: iPhone Platform Compiler Symbol? (From: Philip Aker <email@hidden>)
 >Re: iPhone Platform Compiler Symbol? (From: Gwynne Raskind <email@hidden>)

  • Prev by Date: date-time info at compile time
  • Next by Date: Re: Using Objective-C object in C++ source
  • Previous by thread: Re: iPhone Platform Compiler Symbol?
  • Next by thread: Re: iPhone Platform Compiler Symbol?
  • Index(es):
    • Date
    • Thread