From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7648 invoked by alias); 3 Aug 2017 15:57:30 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 7162 invoked by uid 89); 3 Aug 2017 15:57:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=seriously X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 03 Aug 2017 15:57:26 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 08BCE46269; Thu, 3 Aug 2017 15:57:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 08BCE46269 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law@redhat.com Received: from localhost.localdomain (ovpn-116-95.phx2.redhat.com [10.3.116.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id C4F905D9CD; Thu, 3 Aug 2017 15:57:24 +0000 (UTC) Subject: Re: [PING^4][PATCH v2] Generate reproducible output independently of the build-path To: Yury Gribov , Ximin Luo , GCC Patches References: <20170721161538.7508-1-infinity0@pwned.gg> <3136125b-bd88-7c0b-504e-a4e4de545bbb@redhat.com> <4b6c844f-9a46-4a4b-48c5-9dfeac54b97f@pwned.gg> <565c6de9-2d85-24f9-faaf-6d8ac476b3a8@gmail.com> From: Jeff Law Message-ID: Date: Thu, 03 Aug 2017 15:57:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <565c6de9-2d85-24f9-faaf-6d8ac476b3a8@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00316.txt.bz2 On 08/02/2017 10:47 PM, Yury Gribov wrote: > On 03.08.2017 3:06, Ximin Luo wrote: >> Jeff Law: >>> On 07/21/2017 10:15 AM, Ximin Luo wrote: >>>> (Please keep me on CC, I am not subscribed) >>>> >>>> >>>> Proposal >>>> ======== >>>> >>>> This patch series adds a new environment variable >>>> BUILD_PATH_PREFIX_MAP. When >>>> this is set, GCC will treat this as extra implicit >>>> "-fdebug-prefix-map=$value" >>>> command-line arguments that precede any explicit ones. This makes >>>> the final >>>> binary output reproducible, and also hides the unreproducible value >>>> (the source >>>> path prefixes) from CFLAGS et. al. which many build tools >>>> (understandably) >>>> embed as-is into their build output. >>> I'd *really* avoid doing this with magic environment variables. Make it >>> a first class option to the compiler. Yes, it means projects that want >>> this behavior have to arrange to pass that flag to their compiler, but >>> IMHO that's much preferred over environment variables. >>> >>> Jeff >>> >> >> Hi Jeff, >> >> If by "first class option" you meant a command-line flag, GCC *already >> has* that (-fdebug-prefix-map) > and it wasn't enough to achieve >> reproducibility in many cases we tested. > > Shouldn't -fdebug-prefix-map be updated to use the same syntax as > BUILD_PATH_PREFIX_MAP? Or a different option to cover what Ximin is trying to do with BUILD_PATH_PREFIX_MAP. BUILD_PATH_PREFIX_MAP has to go, I'm not going to approve it in that form. But I would seriously consider the same functionality as a command line switch. jeff