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

From: Peter Wemm (peter_at_wemm.org)
Date: 11/09/04

  • Next message: Peter Wemm: "Re: bsdtar breakage ?"
    To: freebsd-current@freebsd.org
    Date: Mon, 8 Nov 2004 18:09:37 -0800
    
    

    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
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
    

  • Next message: Peter Wemm: "Re: bsdtar breakage ?"

    Relevant Pages

    • Re: RFC: Building libstdc++ with -frandom-seed=RepeatabilityConsideredGood
      ... > This is a new option in gcc 3.4 which allows a string to be specified ... > be used as a random number seed in place of the usual behaviour ... this change means that if you compile libstdc++ ...
      (freebsd-current)
    • Re: a little mistake
      ... removes extra spaces in string ... software which allows gcc compiling in windows is not working. ... /* note that our string will also have ...
      (comp.lang.c)
    • Re: __generic?
      ... apparently it is used for type-punning in GCC, so I am not sure if it can be used for comparisons in the GCC case. ... as I guess it would depend some on how the particular language handles types in expressions. ...
      (comp.std.c)
    • Re: Type of a string literal
      ... Is this a GCC bug or am I misinterpreting the standard? ... That's why gcc can issue a warning ... The anonymous array created by the string literal ... to have with the compiler developers, ...
      (comp.lang.c)
    • Re: [RFC] cleanup patches for strings
      ... because all the string texts are collected in one place. ... #define MSG2 "Message text blah, ... The #ifdef allows for a "trial build" so GCC can type match parms to format ... stuff into a header, and voila, you've got trivial kernel/driver translation ...
      (Linux-Kernel)