public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Basile Starynkevitch <basile@starynkevitch.net>
To: Ian Lance Taylor <iant@google.com>
Cc: Jakub Jelinek <jakub@redhat.com>,
	Mike Stump <mikestump@comcast.net>,
	David Edelsohn <dje.gcc@gmail.com>,
	gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org
Subject: Re: PATCH RFA: Build stages 2 and 3 with C++
Date: Thu, 21 Jul 2011 20:12:00 -0000	[thread overview]
Message-ID: <20110721214550.38988e1c14acad1a0f670b59@starynkevitch.net> (raw)
In-Reply-To: <mcrsjpzy02b.fsf@coign.corp.google.com>

On Thu, 21 Jul 2011 11:13:00 -0700
Ian Lance Taylor <iant@google.com> wrote:

> Jakub Jelinek <jakub@redhat.com> writes:
> 
> > On Thu, Jul 21, 2011 at 08:51:46AM -0700, Ian Lance Taylor wrote:
> >> Basile Starynkevitch <basile@starynkevitch.net> writes:
> >> 
> >> > I have a similar issue in the MELT branch, and I am passing to -frandom-seed the md5sum
> >> > of relevant source files. With such a trick, the seed is reproducible from one build to
> >> > the next one (of the exact same source tree), and does provide much more randomness than
> >> > just using 0 all the time.
> >> 
> >> In practice I think it is fine to just pass the source file name to
> >> -frandom-seed.  That's what the patch I sent out does.  The source file
> >> name should be unique within a given program.
> >
> > Isn't the filename already encoded in what get_file_function_name returns?
> > It is <filename>_<weak_var_name_crc32>_<random_seed_crc32>, so IMHO
> > -frandom-seed=$@ brings almost no advantages at all over -frandom-seed=0.
> > Except perhaps for the characters from the filename that are
> > wiped into _ by clean_symbol_name.
> 
> That's a fair point, but I guess I still think using the file name with
> -frandom-seed is going to be more future-proof against other users of
> random numbers.

Using the md5sum of the file is probably not bad neither. I would understand that you
find it being perhaps too complex for your need, but it is much more random than just the
file name (because the md5sum changes with the file content).

Cheers.


-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***

  reply	other threads:[~2011-07-21 19:46 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-16  6:56 Ian Lance Taylor
2011-07-16  7:05 ` Andrew Pinski
2011-07-16  7:48   ` Ian Lance Taylor
2011-07-16  7:59     ` Basile Starynkevitch
2011-07-17  3:17       ` Ian Lance Taylor
2011-07-16 16:11 ` Diego Novillo
2011-07-16 22:58   ` Ian Lance Taylor
2011-07-17 10:36     ` Richard Guenther
2011-07-17 12:21       ` Eric Botcazou
2011-07-17 16:55         ` Richard Guenther
2011-07-17 17:55           ` Markus Trippelsdorf
2011-07-17 22:37             ` Markus Trippelsdorf
2011-09-04 17:20   ` Thomas Schwinge
2011-07-16 20:40 ` Toon Moene
2011-07-19 21:33 ` Ian Lance Taylor
2011-07-19 22:24   ` Gabriel Dos Reis
2011-07-20  0:46   ` H.J. Lu
2011-07-20  1:15     ` H.J. Lu
2011-07-20  6:28   ` David Edelsohn
2011-07-20  9:34     ` Jonathan Wakely
2011-07-20 11:02       ` Jonathan Wakely
2011-07-20 12:41         ` David Edelsohn
2011-07-20 12:48           ` Richard Guenther
2011-07-20 14:07             ` Diego Novillo
2011-07-20 14:34               ` Ian Lance Taylor
2011-07-20 15:35                 ` Jonathan Wakely
2011-07-20 15:06   ` Toon Moene
2011-07-20 15:23     ` Ian Lance Taylor
2011-07-20 15:53       ` David Edelsohn
2011-07-20 15:55         ` Ian Lance Taylor
2011-07-20 20:05           ` David Edelsohn
2011-07-20 20:53             ` Ian Lance Taylor
2011-07-20 21:06               ` Mike Stump
2011-07-21  0:10                 ` Ian Lance Taylor
2011-07-21  9:40                   ` Basile Starynkevitch
2011-07-21 16:06                     ` Ian Lance Taylor
2011-07-21 17:44                       ` Jakub Jelinek
2011-07-21 19:40                         ` Ian Lance Taylor
2011-07-21 20:12                           ` Basile Starynkevitch [this message]
2011-07-21 22:38                             ` Ian Lance Taylor
2011-07-21  6:57                 ` David Edelsohn
2011-07-21  7:25                   ` Eric Botcazou
2011-07-21 14:24               ` David Edelsohn
2011-07-20 17:58         ` Thomas Schwinge
2011-07-20 21:41     ` Toon Moene
2011-07-31 23:20 ` Marc Glisse
2011-08-01  9:14   ` Richard Guenther
2011-08-01  9:53     ` Joseph S. Myers
2011-08-01  9:59       ` Richard Guenther
2011-08-01 10:05       ` Marc Glisse
2011-08-08 17:42 ` Romain Geissler
2011-08-08 18:49   ` Ian Lance Taylor
2011-08-08 19:40     ` Romain Geissler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110721214550.38988e1c14acad1a0f670b59@starynkevitch.net \
    --to=basile@starynkevitch.net \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=iant@google.com \
    --cc=jakub@redhat.com \
    --cc=mikestump@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).