unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 0/1] gnu: gcc@5: Make __DATE__ and __TIME__ macros reproducible.
@ 2017-01-21 11:36 Marius Bakke
  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
  0 siblings, 2 replies; 4+ messages in thread
From: Marius Bakke @ 2017-01-21 11:36 UTC (permalink / raw)
  To: guix-devel; +Cc: Marius Bakke

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-23 19:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-21 11:36 [PATCH 0/1] gnu: gcc@5: Make __DATE__ and __TIME__ macros reproducible Marius Bakke
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

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).