From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25892 invoked by alias); 2 Aug 2017 19:09:28 -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 25167 invoked by uid 89); 2 Aug 2017 19:09:28 -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=luo, Luo 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; Wed, 02 Aug 2017 19:09:27 +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 D1EB420273; Wed, 2 Aug 2017 19:09:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D1EB420273 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 3671317D0E; Wed, 2 Aug 2017 19:09:24 +0000 (UTC) Subject: Re: [PING^4][PATCH v2] Generate reproducible output independently of the build-path To: Ximin Luo , GCC Patches References: <20170721161538.7508-1-infinity0@pwned.gg> From: Jeff Law Message-ID: <3136125b-bd88-7c0b-504e-a4e4de545bbb@redhat.com> Date: Wed, 02 Aug 2017 19:09: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: <20170721161538.7508-1-infinity0@pwned.gg> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00232.txt.bz2 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