From owner-freebsd-current@FreeBSD.ORG Tue Nov 9 00:31:36 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 AAFBF16A4CE for ; Tue, 9 Nov 2004 00:31:36 +0000 (GMT) Received: from tx6.mail.ox.ac.uk (tx6.mail.ox.ac.uk [163.1.2.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB77B43D2F for ; Tue, 9 Nov 2004 00:31:35 +0000 (GMT) (envelope-from colin.percival@wadham.ox.ac.uk) Received: from scan6.mail.ox.ac.uk ([163.1.2.179] helo=localhost) by tx6.mail.ox.ac.uk with esmtp (Exim 4.42) id 1CRJv4-0000Hn-MO for current@freebsd.org; Tue, 09 Nov 2004 00:31:34 +0000 Received: from rx6.mail.ox.ac.uk ([163.1.2.170]) by localhost (scan6.mail.ox.ac.uk [163.1.2.179]) (amavisd-new, port 25) with ESMTP id 01019-01 for ; Tue, 9 Nov 2004 00:31:34 +0000 (GMT) Received: from gateway.wadham.ox.ac.uk ([163.1.161.253]) by rx6.mail.ox.ac.uk with smtp (Exim 4.42) id 1CRJv4-0000Hj-Lf for current@freebsd.org; Tue, 09 Nov 2004 00:31:34 +0000 Received: (qmail 7986 invoked by uid 1004); 9 Nov 2004 00:31:34 -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.016579 secs); 09 Nov 2004 00:31:34 -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 00:31:34 -0000 Message-ID: <41900FE6.1060602@wadham.ox.ac.uk> Date: Tue, 09 Nov 2004 00:31:34 +0000 From: Colin Percival User-Agent: Mozilla Thunderbird 0.9 (X11/20041107) X-Accept-Language: en-us, en MIME-Version: 1.0 To: current@freebsd.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: kan@freebsd.org Subject: 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 00:31:36 -0000 I would like to add the following line to lib/libstdc++/Makefile: CFLAGS+= -frandom-seed=RepeatabilityConsideredGood This is a new option in gcc 3.4 which allows a string to be specified (in this case, the string "RepeatabilityConsideredGood") which will be used as a random number seed in place of the usual behaviour (obtaining a seed from the clock). At present, libstdc++ is the only part of FreeBSD which does not build "recognizably" repeatably. By this I mean that while many files contain timestamps (including all library archives), libstdc++ currently has much greater variation from one build to the next, because it happens to tickle a place in gcc where the random number seed is used. In previous FreeBSD releases, this behaviour was exhibited by the libobjc library. My personal interest in this is for FreeBSD Update -- I need repeatable builds in order to identify which files are affected by security patches -- but since I can't see any downside to using this option, I'd like to commit this instead of keeping it as a local patch. Opinions? Colin Percival