public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Matthias Klose <doko@debian.org>
Cc: Jeff Law <law@redhat.com>, Ximin Luo <infinity0@pwned.gg>,
	       GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PING^4][PATCH v2] Generate reproducible output independently of the build-path
Date: Fri, 04 Aug 2017 13:05:00 -0000	[thread overview]
Message-ID: <20170804130534.GE2123@tucnak> (raw)
In-Reply-To: <7e11eaf0-99fe-e1b3-3396-df7642a56cdc@debian.org>

On Fri, Aug 04, 2017 at 08:32:33AM -0400, Matthias Klose wrote:
> >> GCC already supports a similar environment variable SOURCE_DATE_EPOCH, which was accepted about 2 years ago in a patch written by one of our GSoC students. We are not planning any more environment variables like this, and are committed to fixing other sources of non-determinism by patching the relevant build scripts.
> > I would have rejected that as well :-)  One of the few times I would
> > have disagreed with Bernd.
> 
> You can argue that gcc has command line options to set these, but most build
> systems can be influenced by well documented environment variables like CFLAGS,
> CXXFLAGS, LDFLAGS, so adding one more variable like SOURCE_DATE_EPOCH makes
> sense, considering that many tools dealing with timestamps don't even have
> command line options to do these (and there it's not just about compilers).

Unlike SOURCE_DATE_EPOCH, the other env vars are autoconf/cmake etc.
related, we really shouldn't be adding more of these.
If some package has messed up build system, you can use
CXX='g++ -fwhatever'
or whatever other way to pass flags you want to the compiler or pick the
compiler you prefer to use.

> BUILD_PATH_PREFIX_MAP might be passed as well in CFLAGS / CXXFLAGS, but there
> are build systems that even ignore these environment variables, and it's common
> to require the use of environment variables for distributions, like
> 
> http://pkgs.fedoraproject.org/cgit/rpms/gcc.git/tree/gcc7-foffload-default.patch

Dunno how this patch is related to the env var vs. command line option
question, the env var in the patch is used to communicate stuff from the
gcc driver to subcommands.  It isn't something users should be using on
their own.

	Jakub

  reply	other threads:[~2017-08-04 13:05 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 3/3] When remapping paths, only match whole path components 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-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
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 [this message]
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=20170804130534.GE2123@tucnak \
    --to=jakub@redhat.com \
    --cc=doko@debian.org \
    --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).