From owner-freebsd-current@FreeBSD.ORG Tue Nov 9 18:39:47 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F78616A4D0 for ; Tue, 9 Nov 2004 18:39:47 +0000 (GMT) Received: from tx1.mail.ox.ac.uk (tx1.mail.ox.ac.uk [129.67.1.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id D149543D2D for ; Tue, 9 Nov 2004 18:39:46 +0000 (GMT) (envelope-from colin.percival@wadham.ox.ac.uk) Received: from scan1.mail.ox.ac.uk ([129.67.1.166] helo=localhost) by tx1.mail.ox.ac.uk with esmtp (Exim 4.42) id 1CRau9-0001u0-6O for freebsd-current@freebsd.org; Tue, 09 Nov 2004 18:39:46 +0000 Received: from rx1.mail.ox.ac.uk ([129.67.1.165]) by localhost (scan1.mail.ox.ac.uk [129.67.1.166]) (amavisd-new, port 25) with ESMTP id 06980-08 for ; Tue, 9 Nov 2004 18:39:45 +0000 (GMT) Received: from gateway.wadham.ox.ac.uk ([163.1.161.253]) by rx1.mail.ox.ac.uk with smtp (Exim 4.42) id 1CRau9-0001tx-5h for freebsd-current@freebsd.org; Tue, 09 Nov 2004 18:39:45 +0000 Received: (qmail 3692 invoked by uid 1004); 9 Nov 2004 18:39:45 -0000 Received: from colin.percival@wadham.ox.ac.uk by gateway by uid 71 with qmail-scanner-1.20 (clamscan: 0.67. sweep: 2.18/3.79. Clear:RC:1(163.1.161.203):. Processed in 0.015982 secs); 09 Nov 2004 18:39:45 -0000 Received: from dhcp1203.wadham.ox.ac.uk (HELO ?163.1.161.203?) (163.1.161.203) by gateway.wadham.ox.ac.uk with SMTP; 9 Nov 2004 18:39:45 -0000 Message-ID: <41910EF0.4060402@wadham.ox.ac.uk> Date: Tue, 09 Nov 2004 18:39:44 +0000 From: Colin Percival User-Agent: Mozilla Thunderbird 0.9 (X11/20041107) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Peter Wemm References: <41900FE6.1060602@wadham.ox.ac.uk> <200411081809.37894.peter@wemm.org> In-Reply-To: <200411081809.37894.peter@wemm.org> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org cc: current@freebsd.org Subject: Re: RFC: Building libstdc++ with -frandom-seed=RepeatabilityConsideredGood X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Nov 2004 18:39:47 -0000 Peter Wemm wrote: > On Monday 08 November 2004 04:31 pm, Colin Percival wrote: >>CFLAGS+= -frandom-seed=RepeatabilityConsideredGood > > So, in a nutshell.. this change means that if you compile libstdc++ > twice in a row from the same source, you would now get an identical > binary... whereas now you get a different binary each time you compile > the same source? Yes. The .so file now varies from one build to the next, and this would make them remain identical. The .a files of course still have all of their timestamps which vary from one build to the next. > It doesn't change the actual implementation of random number generators > or anything like that inside the library? No. This is strictly an issue of seeding gcc's random number generator during the compile... the binary produced with this flag has a 1 in 2^32 chance of being produced randomly at present. (Or maybe 1 in 2^64 on applicable systems, I can't remember.) Colin Percival