From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12004 invoked by alias); 21 Jul 2011 18:13:33 -0000 Received: (qmail 11992 invoked by uid 22791); 21 Jul 2011 18:13:31 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 21 Jul 2011 18:13:19 +0000 Received: from hpaq5.eem.corp.google.com (hpaq5.eem.corp.google.com [172.25.149.5]) by smtp-out.google.com with ESMTP id p6LIDGw5025937 for ; Thu, 21 Jul 2011 11:13:16 -0700 Received: from iwn6 (iwn6.prod.google.com [10.241.68.70]) by hpaq5.eem.corp.google.com with ESMTP id p6LID48B026108 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 21 Jul 2011 11:13:05 -0700 Received: by iwn6 with SMTP id 6so1415244iwn.5 for ; Thu, 21 Jul 2011 11:13:03 -0700 (PDT) Received: by 10.231.209.138 with SMTP id gg10mr453776ibb.69.1311271983659; Thu, 21 Jul 2011 11:13:03 -0700 (PDT) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id f14sm2158038icm.15.2011.07.21.11.13.01 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Jul 2011 11:13:02 -0700 (PDT) From: Ian Lance Taylor To: Jakub Jelinek Cc: Basile Starynkevitch , Mike Stump , David Edelsohn , gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org Subject: Re: PATCH RFA: Build stages 2 and 3 with C++ References: <4E26E775.7070802@moene.org> <20110721092510.86ade74ddfe5b88d32e68876@starynkevitch.net> <20110721160603.GS2687@tyan-ft48-01.lab.bos.redhat.com> Date: Thu, 21 Jul 2011 19:40:00 -0000 In-Reply-To: <20110721160603.GS2687@tyan-ft48-01.lab.bos.redhat.com> (Jakub Jelinek's message of "Thu, 21 Jul 2011 18:06:03 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true 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/msg00410.txt.bz2 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. Ian