From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24224 invoked by alias); 30 Jun 2015 15:19:22 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 24211 invoked by uid 89); 30 Jun 2015 15:19:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: smtp21.openmailbox.org Received: from smtp21.openmailbox.org (HELO smtp21.openmailbox.org) (62.4.1.55) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 30 Jun 2015 15:19:20 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.openmailbox.org (Postfix) with ESMTP id 5C09E2E0232; Tue, 30 Jun 2015 17:19:17 +0200 (CEST) Received: from mail.openmailbox.org ([62.4.1.34]) by localhost (mail.openmailbox.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id FwC0IpjgnE2G; Tue, 30 Jun 2015 17:19:14 +0200 (CEST) Message-ID: <5592B356.3080601@openmailbox.org> Date: Tue, 30 Jun 2015 15:42:00 -0000 From: Dhole User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org CC: =?windows-1252?Q?Manuel_L=F3pez-Ib=E1=F1ez?= Subject: Re: [PATCH] Allow embedded timestamps by C/C++ macros to be set externally References: <55929721.4020400@openmailbox.org> <5592AB0D.5000501@gmail.com> <5592AC51.5040007@gmail.com> In-Reply-To: <5592AC51.5040007@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eii4QnJ1qMRPvDVdCGh8e52cFHbiBr09G" X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg02233.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --eii4QnJ1qMRPvDVdCGh8e52cFHbiBr09G Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Content-length: 2212 On 06/30/2015 04:48 PM, Manuel L=F3pez-Ib=E1=F1ez wrote: > On 30/06/15 16:43, Manuel L=F3pez-Ib=E1=F1ez wrote: >> Perhaps this has been discussed and discarded before (if so I would >> appreciate >> if you could point me to the relevant discussion), why not simply >> redefine >> __DATE__ and __TIME__ to an appropriate string via the command-line or >> a dummy >> include? I'm not aware of any previous discussion on the subject, but I'm also interested in reading it in case it exists :) In the debian reproducible builds project we have considered several options to address this issue. We considered redefining the __DATE__ and __TIME__ defines by command line flags passed to gcc, but as you say, that triggers warnings, which could become errors when building with -Werror and thus may require manual intervention on many packages. We are trying to find a solution that can make as much packages build reproducible as possible minimizing the amount of specific patches for affected packages, and we believe such solution will benefit other projects working on reproducible builds as well. We propose to extend the env variable SOURCE_DATE_EPOCH to anyone interested for this purpose. For instance, this feature has been implemented upstream in help2man (1.47.1) [1], quoting the latest changelog entry: """ * Add support for reproducible builds by using $SOURCE_DATE_EPOCH as the date for the generated pages (closes: #787444). """ >> That probably triggers some warnings (or it may not be supported at >> all, I >> haven't tried myself), but fixing those issues leads to a more general >> solution >> than GCC reacting to an arbitrary variable name and changing its >> behaviour >> quite silently. In case the fact that GCC changing its behavior silently is a concern, we also discussed the possibility of enabling this feature with a flag such as `--use-date-from-env`. Again, we are open to comments and other ideas about this approach :) > In any case, you should be aware of point 10 here: > https://gcc.gnu.org/wiki/Community (You only need to convince the > decision-makers). I'm not one of them ;) Thanks for the tip! [1] https://www.gnu.org/software/help2man/ Best regards, Dhole --eii4QnJ1qMRPvDVdCGh8e52cFHbiBr09G Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJVkrNaAAoJEE+kV6GFFMxjkTUP/0c2o1Rp/83LULE8yad/tJAZ sKxeSJ9a/kmXCWYpap8Ezlfh7YcGaZb0CbzgfSj35SvLW4/45H2e6Dx2/mQQY1gO 3Xe0uAA/4Gh3APdniQ7c7b7py/LK8mDyhdvUzJZjFyPoFJKHfOj9CobyCopAPAS1 d1dfj0u2ON9KmzpMLh78pRlvkdkPlCOs5STgviqWuEVTl3d7yk+/ZmWv7VAugkzQ q/HF9UM+CrExqGsBeWvCNs2NUqEjyRAgQ6wu7Zz4wSkCiYfZnlV5xdfYXi0J4XvW pizqT3csMq5PEyVMBdT70UzQqgbEmc1MVBjpggPEwF47YaZ7PbXelbuEr5d5a7xr nrsfCf+93RQkHQDBusZ4LqaZsR/q96jkQ9ttRePiDuktZNzCzYUmRc3SvYQtJeH5 hxL+B0N010e/HjK66qJSRomZ0m3Is5mtO01rtEfQHPHWwkye+q2HuNxu4i1caX5b pr5rtpkw8ommoFi4r6VOTnTdkdPR2ymep7ItoQhJuif8MyViFBgSo2TCHke1YbqN JKZDRjNgsR1M/uA7ho2GePOo1r2Uz7HLGJ6mxYzClkRzlt3KLWfq4hFwTCxGtbbr TGYkULLpv3HojjIxnkQGAAQ6H730Ge50SDINzn6hulv8mhWKDcuWrAtO0lWtu3vR 2uXXz3p5/w88y/CYKcLG =ofGI -----END PGP SIGNATURE----- --eii4QnJ1qMRPvDVdCGh8e52cFHbiBr09G--