From owner-freebsd-current@FreeBSD.ORG Tue Nov 9 02:09:38 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 5E93516A4CE; Tue, 9 Nov 2004 02:09:38 +0000 (GMT) Received: from daintree.corp.yahoo.com (daintree.corp.yahoo.com [216.145.52.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C65C43D55; Tue, 9 Nov 2004 02:09:38 +0000 (GMT) (envelope-from peter@wemm.org) Received: by daintree.corp.yahoo.com (Postfix, from userid 2154) id 304D71976E; Mon, 8 Nov 2004 18:09:38 -0800 (PST) From: Peter Wemm To: freebsd-current@freebsd.org Date: Mon, 8 Nov 2004 18:09:37 -0800 User-Agent: KMail/1.7 References: <41900FE6.1060602@wadham.ox.ac.uk> In-Reply-To: <41900FE6.1060602@wadham.ox.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200411081809.37894.peter@wemm.org> cc: kan@freebsd.org cc: current@freebsd.org cc: Colin Percival 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 02:09:38 -0000 On Monday 08 November 2004 04:31 pm, Colin Percival wrote: > 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. 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? It doesn't change the actual implementation of random number generators or anything like that inside the library? If both of these are correct, then it sounds like a good thing to me... -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5