public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Yury Gribov <tetra2005.patches@gmail.com>
To: Ximin Luo <infinity0@pwned.gg>, Jeff Law <law@redhat.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PING^4][PATCH v2] Generate reproducible output independently of the build-path
Date: Thu, 03 Aug 2017 04:49:00 -0000	[thread overview]
Message-ID: <565c6de9-2d85-24f9-faaf-6d8ac476b3a8@gmail.com> (raw)
In-Reply-To: <4b6c844f-9a46-4a4b-48c5-9dfeac54b97f@pwned.gg>

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?

-Y

  reply	other threads:[~2017-08-03  4:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-21 16:16 Ximin Luo
2017-07-21 16:16 ` [PATCH 1/3] Use BUILD_PATH_PREFIX_MAP envvar for debug-prefix-map Ximin Luo
2017-08-02 19:19   ` Jeff Law
2017-07-21 16:16 ` [PATCH 2/3] Use BUILD_PATH_PREFIX_MAP envvar to transform __FILE__ Ximin Luo
2017-07-21 16:16 ` [PATCH 3/3] When remapping paths, only match whole path components Ximin Luo
2017-08-02 19:09 ` [PING^4][PATCH v2] Generate reproducible output independently of the build-path Jeff Law
2017-08-03  2:06   ` Ximin Luo
2017-08-03  4:49     ` Yury Gribov [this message]
2017-08-03 11:46       ` Ximin Luo
2017-08-04  8:40         ` Yury Gribov
2017-08-10 21:29           ` Ximin Luo
2017-08-03 15:57       ` Jeff Law
2017-08-03 16:05     ` Jeff Law
2017-08-03 17:02       ` Ximin Luo
2017-08-04 12:32       ` Matthias Klose
2017-08-04 13:05         ` Jakub Jelinek
2017-08-10 21:15           ` Ximin Luo
2017-08-04 16:05         ` Yury Gribov
2017-08-10 20:55           ` Ximin Luo
2017-08-11  2:53             ` Joseph Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=565c6de9-2d85-24f9-faaf-6d8ac476b3a8@gmail.com \
    --to=tetra2005.patches@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=infinity0@pwned.gg \
    --cc=law@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).