On Tue, 26 Feb 2019, Michael Matz wrote: > Hi, > > On Tue, 26 Feb 2019, Richard Biener wrote: > > > get_build_id_1 (struct dl_phdr_info *info, size_t, void *data) > > { > > Isn't this all a bit silly? We could simply encode the svn revision, or > maybe even just some random bytes generated once in stage1 at build time > as "checksum" and be done with. In the latter case PCHs will then not > work across different compiler builds, but so what?
Yes, a random number would work for PCH purposes but of course not for reproducible builds. Somehow even compile-options are relevant though so I'm not really sure how volatile the PCH format is. That is, whether for example checksumming sources would work. But yeah, I considered a --with-pch-checksum=XYZ to make this configurable (where we could for example checksum the rpm changes - iff PCHs of two different builds - say, one with checking enabled and one with checking disabled - really interoperate). Still, using the build-id looks so "obvious" ... Richard.