This is the mail archive of the
mailing list for the GCC project.
Re: [RFC] Change PCH "checksum"
- From: Jeff Law <law at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>, gcc at gcc dot gnu dot org
- Date: Fri, 22 Feb 2019 08:47:09 -0700
- Subject: Re: [RFC] Change PCH "checksum"
- References: <alpine.LSU.firstname.lastname@example.org>
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)?
> 2019-02-22 Richard Biener <email@example.com>
> * Make-lang.in (cc1-checksum.c): Checksum only gtype-desc.o.
> * Make-lang.in (cc1plus-checksum.c): Checksum only gtype-desc.o.
> * Make-lang.in (cc1obj-checksum.c): Checksum only gtype-desc.o.
> * 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