Re: RFC: Building libstdc++ with -frandom-seed=RepeatabilityConsideredGood

From: Colin Percival <colin.percival_at_wadham.ox.ac.uk>
Date: Tue, 09 Nov 2004 18:39:44 +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
Received on Tue Nov 09 2004 - 17:39:47 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:21 UTC