delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/05/04/13:22:01

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; q=dns; s=default; b=sGV5+Un
6PHwqIfBdroTXjacL8RX9ssd/5axdMPgfRtWj5n6qBXpCrhnvbaQEY7Sqay/ZkuJ
A1t4U0kFDHQNaRguSAMQyjUb5j1w4eXDUs4dvo4AzjGrCpRBd1n9W17hj3ZdQDRs
AWfDcN2wNTMyjnRXqyez4K6wAmLIFt2W0ng4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; s=default; bh=duC19GmpjwCtz
HIrYxTh2XT23oA=; b=C325tybT9ex8o/98/69vaS4lPQrRpRMqvI9e+3XAfTItF
XsTHPK1aMrP8JP9tKxg0gKpJorSUBhkGPof9G7yqExuFjZU5i5fAT4jk2+Yjop31
itdzCZ0vEIWOdZ88yVvhx5+iRgPMo2+ctRXw37qFyt/LsH3QXvgHXTb44WPD7k=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=BAYES_05,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=D*cornell.edu, U*kbrown, sk:kbrown@, kbrowncornelledu
X-HELO: mail-wm0-f47.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=aPz9kWOn62vMWSoj5QHP5vAHB4WHFC3qlm3PPtCuFZo=; b=jLdy5af8K/CL7Hx7e2WgpaMGh9SxhGxlqCx5UigBPt29rq56/Kl5v5cp84q35QzHTT iUSd76y6ik+ZtYAS5ap1dRlH4RWKjmBoz6zuOXi9DeNVzBhZ9pLpV/9C9CWX1Goo7Hb5 gAsXg5iTJN3GnsR3l8lGqK339aQdK55uejekXdbpRkDeaWhy1NVJ2zlCkhpfsEMetsjd G1jaGKqyM10PybUM8n5NblQPcssf96MWiCj5HMEvz3+2V3MOLq+MxXyKwyUt4R1yXI/f EP2l51Pq/9Etdod4uHG80wG/QpT1FMCo9KebRQ5YexZoj0/LllOVTB5aRBK1gAY1J+lY 046g==
X-Gm-Message-State: AOPr4FVN5L7HlRmBhkKGJgvXm8RSP3wuMLHpZXfuESyKSQV2zTq/Kl+8o1mVCmiXlxHGIm7u6g/f4Fu1+zQmWw==
X-Received: by 10.28.54.33 with SMTP id d33mr10920600wma.62.1462382490565; Wed, 04 May 2016 10:21:30 -0700 (PDT)
MIME-Version: 1.0
In-Reply-To: <ff5f5b20-33e2-ef2d-012a-a9e02903ba21@cornell.edu>
References: <ff5f5b20-33e2-ef2d-012a-a9e02903ba21 AT cornell DOT edu>
From: Ismail Donmez <ismail AT i10z DOT com>
Date: Wed, 4 May 2016 20:21:00 +0300
Message-ID: <CAFo71_4uBbNZ6JakbNE3mJ3HgvFRnFa-dK+GSrNdpmds1iXzow@mail.gmail.com>
Subject: Re: Deterministic builds
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

Hi,

On Wed, May 4, 2016 at 4:38 PM, Ken Brown <kbrown AT cornell DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019