This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: compiler rebuild invalidates precompiled header
- From: "Jan Beulich" <JBeulich at novell dot com>
- To: <geoffk at geoffk dot org>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Mon, 17 May 2004 11:22:24 +0200
- Subject: Re: compiler rebuild invalidates precompiled header
>The PCH machinery checks that the version string is the same. This is
>good enough for released builds and for snapshots. If you're
actually
>working on the compiler, the Makefiles should ensure that PCH files
>are rebuilt; if they're not doing this, that's a bug, please make a
>patch.
Perhaps.
>It would be possible to have more complicated machinery that makes a
>checksum of the compiler executable, but it doesn't seem worth it if
>the alternative is just fixing a Makefile (and you would have to do
>that anyway).
You'd have to consider the case of entirely unrelated makefiles
(outside of the gcc tree) potentially having to deal with this as well,
and putting into generic makefiles dependencies like on the compiler's
(not the driver's) filename seems rather ugly and non-portable. As an
example, consider I rebuilt a version of gcc with a fix I'm testing and
then want to re-build the single source file in a larger project where
the problem I'm trying to fix was found. The logical thing is to either
touch the source file or delete the object file, but it's completely
unintuitive (and a compiler implementation detail) to also have to
delete the precompiled header(s), the more that after that test I'd
potentially have to delete the precompiled headers again in order to be
able to build that project with the 'normal' compiler again.
Jan