This is the mail archive of the
mailing list for the GCC project.
Re: [PING^4][PATCH v2] Generate reproducible output independently of the build-path
- From: Jeff Law <law at redhat dot com>
- To: Ximin Luo <infinity0 at pwned dot gg>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 2 Aug 2017 13:09:23 -0600
- Subject: Re: [PING^4][PATCH v2] Generate reproducible output independently of the build-path
- Authentication-results: sourceware.org; auth=none
- 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 at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D1EB420273
- References: <email@example.com>
On 07/21/2017 10:15 AM, Ximin Luo wrote:
> (Please keep me on CC, I am not subscribed)
> 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.