RFC: Building libstdc++ with
-frandom-seed=RepeatabilityConsideredGood
Colin Percival
colin.percival at wadham.ox.ac.uk
Tue Nov 9 10:39:47 PST 2004
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
More information about the freebsd-current
mailing list