From: Ismail Donmez <ismail@i10z.com>
To: cygwin@cygwin.com
Subject: Re: Deterministic builds
Date: Wed, 04 May 2016 17:21:00 -0000 [thread overview]
Message-ID: <CAFo71_4uBbNZ6JakbNE3mJ3HgvFRnFa-dK+GSrNdpmds1iXzow@mail.gmail.com> (raw)
In-Reply-To: <ff5f5b20-33e2-ef2d-012a-a9e02903ba21@cornell.edu>
Hi,
On Wed, May 4, 2016 at 4:38 PM, Ken Brown <kbrown@cornell.edu> wrote:
> Is it possible to build an executable on Cygwin so that subsequent builds
> (with no change in source) produce identical results? Currently, the
> timestamp embedded in executables prevents this. (I don't know if that's
> the only obstacle.)
>
> For example:
>
> $ cat hello.c
> #include <stdio.h>
> int
> main ()
> {
> printf("Hello, world!\n");
> return 0;
> }
>
> $ gcc hello.c -o hello1
>
> $ gcc hello.c -o hello2
>
> $ objdump -p hello1.exe | grep Time/Date
> Time/Date Wed May 4 09:20:24 2016
>
> $ objdump -p hello2.exe | grep Time/Date
> Time/Date Wed May 4 09:20:29 2016
You can easily disable this feature:
latte ~ > gcc -Wl,--no-insert-timestamp hello.c
latte ~ > objdump -p a.exe | grep Time/Date
Time/Date Thu Jan 1 03:31:53 1970
latte ~ > gcc -Wl,--no-insert-timestamp hello.c
latte ~ > objdump -p a.exe | grep Time/Date
Time/Date Thu Jan 1 03:31:53 1970
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2016-05-04 17:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-04 13:38 Ken Brown
2016-05-04 14:30 ` Greg Chicares
2016-05-04 17:11 ` Achim Gratz
2016-05-04 17:21 ` Ismail Donmez [this message]
2016-05-04 17:40 ` Ken Brown
2016-05-05 17:59 ` Ken Brown
2016-05-05 20:26 ` Warren Young
2016-05-05 21:46 ` Ken Brown
2016-05-05 1:50 ` Andrey Repin
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=CAFo71_4uBbNZ6JakbNE3mJ3HgvFRnFa-dK+GSrNdpmds1iXzow@mail.gmail.com \
--to=ismail@i10z.com \
--cc=cygwin@cygwin.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).