Re: Preccompiled header compatibility
Re: Preccompiled header compatibility
- Subject: Re: Preccompiled header compatibility
- From: Chris Espinosa <email@hidden>
- Date: Mon, 31 Aug 2009 10:50:06 -0700
On Aug 31, 2009, at 10:15 AM, Stefan Haller wrote:
Thanks. I'm not using Xcode, but a Makefile-based build system.
Before
calling make, I need to trash the precompiled headers if they are not
compatible. To find out if this is the case, I remember the
command-line options that the headers were built with, and the version
of gcc that was used to build them. None of these have changed when I
upgraded to Xcode 3.2 (I explicitly call g++-4.0), so it must be the
64-bit thing then.
How do I determine whether gcc will run in 32-bit mode or 64-bit mode?
How does Xcode do it? It doesn't even store the gcc version that was
used to build the precompiled headers (at least not in
.gch.hash-criteria).
gcc, like all command-line apps in Snow Leopard, will launch in 64
bits on a 64-bit machine. You could set $CC to "arch -i386 /usr/bin/
gcc" to force 32-bit.
Xcode creates and uses the hash-criteria to determine whether to
rebuild the precompiled headers, and it just invalidates them when the
compiler version is changed. gcc can tell that a pch is incompatible,
but I'm not sure what mechanism it uses to do so.
Chris
_______________________________________________
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