This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]