RFC: Building libstdc++ with
-frandom-seed=RepeatabilityConsideredGood
Colin Percival
colin.percival at wadham.ox.ac.uk
Mon Nov 8 16:50:55 PST 2004
Kris Kennaway wrote:
> On Tue, Nov 09, 2004 at 12:31:34AM +0000, Colin Percival wrote:
>>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).
>
> Why does libstdc++ think it needs randomness in its' build? i.e. what
> is the impact of making it not random?
As I understand it, gcc needs to construct a name from each object file
which is guaranteed to be unique. When there is an externally visible
symbol, gcc uses that -- and almost all object files have at least one
externally visible symbol. Four files, however, which used to be part
of libobjc, and are now part of libstdc++, don't have any externally
visible symbols, so gcc generates one using the file name plus a random
string. (This isn't entirely relevant, but if someone can explain how
an object file is useful when it doesn't have any externally visible
symbols... enquiring minds want to know!)
As far as I can see, the only impact would be possible confusing errors
if someone tried to link together multiple object files compiled from
source files sharing the same names (and paths).
Colin Percival
More information about the freebsd-current
mailing list