From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3551 invoked by alias); 21 Jul 2011 19:46:21 -0000 Received: (qmail 3534 invoked by uid 22791); 21 Jul 2011 19:46:21 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,RDNS_DYNAMIC,TVD_RCVD_IP X-Spam-Check-By: sourceware.org Received: from 195-14-0-142.nuxit.net (HELO de558.ispfr.net) (195.14.0.142) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 21 Jul 2011 19:46:07 +0000 Received: from ours.starynkevitch.net ([213.41.244.95] helo=glinka.lesours) by de558.ispfr.net with smtp (Exim 4.72) (envelope-from ) id 1QjzC4-0006pA-MA; Thu, 21 Jul 2011 21:46:00 +0200 Date: Thu, 21 Jul 2011 20:12:00 -0000 From: Basile Starynkevitch To: Ian Lance Taylor Cc: Jakub Jelinek , Mike Stump , David Edelsohn , gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org Subject: Re: PATCH RFA: Build stages 2 and 3 with C++ Message-Id: <20110721214550.38988e1c14acad1a0f670b59@starynkevitch.net> In-Reply-To: References: <4E26E775.7070802@moene.org> <20110721092510.86ade74ddfe5b88d32e68876@starynkevitch.net> <20110721160603.GS2687@tyan-ft48-01.lab.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg00412.txt.bz2 On Thu, 21 Jul 2011 11:13:00 -0700 Ian Lance Taylor wrote: > Jakub Jelinek writes: > > > On Thu, Jul 21, 2011 at 08:51:46AM -0700, Ian Lance Taylor wrote: > >> Basile Starynkevitch 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 __, 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: basilestarynkevitchnet mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mine, sont seulement les miennes} ***