From: Marius Bakke <mbakke@fastmail.com>
To: guix-devel@gnu.org
Cc: Marius Bakke <mbakke@fastmail.com>
Subject: [PATCH 0/1] gnu: gcc@5: Make __DATE__ and __TIME__ macros reproducible.
Date: Sat, 21 Jan 2017 12:36:21 +0100 [thread overview]
Message-ID: <20170121113622.11721-1-mbakke@fastmail.com> (raw)
Hello Guix!
This patch should obsolete the 'snippets' that mess with the __DATE__
and __TIME__ macros in GCC.
It is a backport of the following two commits:
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=e3e8c48c4a494d9da741c1c8ea6c4c0b7c4ff934
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=dfa5c0d3f3e23e4fdb14857a42de376d9ff8601c
...with the ChangeLog entries omitted for easier maintenance.
They *should* be functionally identical to Debians patches:
https://anonscm.debian.org/viewvc/gcccvs/branches/sid/gcc-5/debian/patches/
...but I have not verified this. Any takers?
Tested with the following shell session:
$ cat date.c
#include <stdio.h>
int main()
{
printf( "__DATE__ says: %s \n", __DATE__ );
printf( "__TIME__ says: %s \n", __TIME__ );
return 0;
}
$ ./pre-inst-env guix environment --ad-hoc gcc@5 binutils glibc
[env]$ gcc date.c && ./a.out
__DATE__ says: Jan 21 2017
__TIME__ says: 11:28:06
[env]$ SOURCE_DATE_EPOCH=42 gcc date.c && ./a.out
__DATE__ says: Jan 1 1970
__TIME__ says: 00:00:42
Note: the patch is against 'master' but is intended for 'core-updates'.
\o/
Marius Bakke (1):
gnu: gcc@5: Respect SOURCE_DATE_EPOCH in __DATE__ and __TIME__ macros.
gnu/local.mk | 2 +
gnu/packages/gcc.scm | 4 +-
.../patches/gcc-5-source-date-epoch-1.patch | 223 +++++++++++
.../patches/gcc-5-source-date-epoch-2.patch | 410 +++++++++++++++++++++
4 files changed, 638 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/gcc-5-source-date-epoch-1.patch
create mode 100644 gnu/packages/patches/gcc-5-source-date-epoch-2.patch
--
2.11.0
next reply other threads:[~2017-01-21 11:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-21 11:36 Marius Bakke [this message]
2017-01-21 11:36 ` [PATCH 1/1] gnu: gcc@5: Respect SOURCE_DATE_EPOCH in __DATE__ and __TIME__ macros Marius Bakke
2017-01-21 15:28 ` [PATCH 0/1] gnu: gcc@5: Make __DATE__ and __TIME__ macros reproducible Ludovic Courtès
2017-01-23 19:56 ` Marius Bakke
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=20170121113622.11721-1-mbakke@fastmail.com \
--to=mbakke@fastmail.com \
--cc=guix-devel@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.