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: [RFC] Change PCH "checksum"


On 2/22/19 4:29 AM, Richard Biener wrote:
> 
> GCC builds are currently not reproducible because for one the checksum
> we compute for PCH purposes (by genchecksum) nowaways includes checksums
> of archives (since we switched from checksumming a dummy executable
> to checksumming object files).  That includes dates (unless built with
> -D which we don't do).
> 
> Then later we switched to do thin archives so for example libbackend.a
> we checksum doesn't contain the actual code anymore...
> 
> A pragmatic approach to "fix" things would be to just checksum
> gtype-desc.o which should have enough state to cover PCH dependences
> if I understand the workings correctly (patch below - a single
> checksum would suffice so more simplifications are possible).
> 
> Another solution working on ELF systems with build-id support is
> simply forgo checksumming anything and rely on the executable
> build-id instead (pat^whack below as well).
> 
> Does anybody think that just checksumming gtype-desc.o is a
> degradation over the current state (which checksums thin archives)?
> 
> Thanks,
> Richard.
> 
> 2019-02-22  Richard Biener  <rguenther@suse.de>
> 
> 	c/
> 	* Make-lang.in (cc1-checksum.c): Checksum only gtype-desc.o.
> 
> 	cp/
> 	* Make-lang.in (cc1plus-checksum.c): Checksum only gtype-desc.o.
> 
> 	objc/
> 	* Make-lang.in (cc1obj-checksum.c): Checksum only gtype-desc.o.
> 
> 	objcp/
> 	* Make-lang.in (cc1objplus-checksum.c): Checksum only gtype-desc.o.
ISTM that gtype-desc effectively describes the structure of all the GC data.

Given we're summing the thin-archives, we're already missing things like
a change in static data.  So I don't think your patch is a degradation
over the current state.  I'm not 100% sure the current state is correct
though :-)

jeff


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