From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 0/1] gnu: gcc@5: Make __DATE__ and __TIME__ macros reproducible. Date: Sat, 21 Jan 2017 16:28:34 +0100 Message-ID: <874m0sl9el.fsf@gnu.org> References: <20170121113622.11721-1-mbakke@fastmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUxar-0006wm-7Q for guix-devel@gnu.org; Sat, 21 Jan 2017 10:28:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUxan-0000JP-J1 for guix-devel@gnu.org; Sat, 21 Jan 2017 10:28:41 -0500 In-Reply-To: <20170121113622.11721-1-mbakke@fastmail.com> (Marius Bakke's message of "Sat, 21 Jan 2017 12:36:21 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Marius Bakke Cc: guix-devel@gnu.org Hi Marius! Marius Bakke skribis: > This patch should obsolete the 'snippets' that mess with the __DATE__ > and __TIME__ macros in GCC. Woohoo! \o/ > They *should* be functionally identical to Debians patches: > > https://anonscm.debian.org/viewvc/gcccvs/branches/sid/gcc-5/debian/patche= s/ > > ...but I have not verified this. Any takers? The =E2=80=98guix environment=E2=80=99 session you show is exactly how I wo= uld have tested it, so I don=E2=80=99t think there=E2=80=99s more to be tested, is t= here? > * gnu/packages/patches/gcc-5-source-date-epoch-1.patch, > gnu/packages/patches/gcc-5-source-date-epoch-2.patch: New files. > * gnu/local.mk (dist_patch_DATA): Register them. > * gnu/packages/gcc.scm (gcc-5)[source]: Use them. [...] > +++ b/gnu/packages/patches/gcc-5-source-date-epoch-1.patch > @@ -0,0 +1,223 @@ > +Make GCC respect SOURCE_DATE_EPOCH in __DATE__ and __TIME__ macros. > + > +Patch adapted from upstream source repository: > + > +https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dcommitdiff;h=3De3e8c48c4a494d9d= a741c1c8ea6c4c0b7c4ff934 > + > +From e3e8c48c4a494d9da741c1c8ea6c4c0b7c4ff934 Mon Sep 17 00:00:00 2001 > +From: doko > +Date: Thu, 28 Apr 2016 09:12:05 +0000 > +Subject: [PATCH] gcc/c-family/ChangeLog: > + > +2016-04-28 Eduard Sanou > + Matthias Klose > + > + * c-common.c (get_source_date_epoch): New function, gets the environment > + variable SOURCE_DATE_EPOCH and parses it as long long with error > + handling. > + * c-common.h (get_source_date_epoch): Prototype. > + * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch. > + > +gcc/ChangeLog: > + > +2016-04-28 Eduard Sanou > + Matthias Klose > + > + * doc/cppenv.texi: Document SOURCE_DATE_EPOCH environment variable. > + > +libcpp/ChangeLog: > + > +2016-04-28 Eduard Sanou > + Matthias Klose > + > + * include/cpplib.h (cpp_init_source_date_epoch): Prototype. > + * init.c (cpp_init_source_date_epoch): New function. > + * internal.h: Added source_date_epoch variable to struct > + cpp_reader to store a reproducible date. > + * macro.c (_cpp_builtin_macro_text): Set pfile->date timestamp from > + pfile->source_date_epoch instead of localtime if source_date_epoch is > + set, to be used for __DATE__ and __TIME__ macros to help reproducible > + builds. I=E2=80=99d only keep the subject line of the patch rather than the complete log, to keep it small. We have the upstream commit URL anyway. Apart from that, LGTM for =E2=80=98core-updates=E2=80=99. Next we can remove all those __DATE__/__TIME__ snippets and dance! Thank you! Ludo=E2=80=99.