From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12461 invoked by alias); 26 Feb 2019 17:02:32 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 12201 invoked by uid 89); 26 Feb 2019 17:02:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:U*matz, matz, Matz X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 26 Feb 2019 17:02:30 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 95C05AE25; Tue, 26 Feb 2019 17:02:28 +0000 (UTC) Date: Tue, 26 Feb 2019 17:02:00 -0000 From: Richard Biener To: Michael Matz cc: Mark Wielaard , gcc@gcc.gnu.org Subject: Re: [RFC] Change PCH "checksum" In-Reply-To: Message-ID: References: <4b144c8b12b3413b1ec450d9ba468b71dd5b4547.camel@klomp.org> User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SW-Source: 2019-02/txt/msg00150.txt.bz2 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.