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


On Monday, May 17, 2004, at 02:22 AM, Jan Beulich wrote:
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.

Imagine that I report a bad codegen bug of gcc that is causing havoc will all my source code and I am not using PCH, and they send my a fix and I install it... Fact is, when you are advanced enough to do things like install a patch into your compiler and switch compilers, we expect that managing a few dependancies by hand would not be that hard.


That said, maybe we could bury the mod time of the compiler binary into the PCH file. This avoids cksumming the .text segment or some other change like that and is fairly sensitive to _any_ changes. Maybe the driver, since it stats the file anyway, could pass that mod time of the stat into the compiler on the command line and the compiler could write that out to the PCH file and validate upon reading.


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