From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34566 invoked by alias); 24 Aug 2015 04:46:29 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 34557 invoked by uid 89); 24 Aug 2015 04:46:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f172.google.com Received: from mail-wi0-f172.google.com (HELO mail-wi0-f172.google.com) (209.85.212.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 24 Aug 2015 04:46:28 +0000 Received: by widdq5 with SMTP id dq5so60506776wid.0 for ; Sun, 23 Aug 2015 21:46:25 -0700 (PDT) X-Received: by 10.194.121.131 with SMTP id lk3mr35541770wjb.77.1440391585175; Sun, 23 Aug 2015 21:46:25 -0700 (PDT) Received: from rubin.lan (ip-109-90-214-45.hsi11.unitymediagroup.de. [109.90.214.45]) by smtp.gmail.com with ESMTPSA id xs1sm21285391wjc.7.2015.08.23.21.46.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Aug 2015 21:46:24 -0700 (PDT) Message-ID: <1440391584.1495.6.camel@gmail.com> Subject: Re: reproducible build From: Stephan Gatzka To: Martin Sebor , gcc-help@gcc.gnu.org Date: Mon, 24 Aug 2015 04:46:00 -0000 In-Reply-To: <55DA36C2.9020805@gmail.com> References: <1440337839.2033.4.camel@gatzka.org> <55DA36C2.9020805@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00144.txt.bz2 Hi! > but based on the mention of -frandom-seed I suspect a better test > case might be one whose outcome can be controlled by the option, > which is pretty much any file compiled with -flto: > > $ (set -x; cat a.c && for o in '' -frandom-seed=123; do gcc -flto -c > $o > -o a1.o a.c && gcc -flto -c $o -o a2.o a.c && diff a1.o a2.o; done) > + cat a.c > int bar (void) { return 0; } > + for o in ''\'''\''' -frandom-seed=123 > + gcc -flto -c -o a1.o a.c > + gcc -flto -c -o a2.o a.c > + diff a1.o a2.o > Binary files a1.o and a2.o differ > + for o in ''\'''\''' -frandom-seed=123 > + gcc -flto -c -frandom-seed=123 -o a1.o a.c > + gcc -flto -c -frandom-seed=123 -o a2.o a.c > + diff a1.o a2.o Ah, thanks, that is the stuff I was looking for. Regards, Stephan