All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Arnout Vandecappelle <arnout@mind.be>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>, buildroot@buildroot.org
Subject: Re: [Buildroot] [autobuild.buildroot.net] Daily results for 2021-08-17
Date: Tue, 24 Aug 2021 00:06:34 +0200	[thread overview]
Message-ID: <20210824000634.07d68905@windsurf> (raw)
In-Reply-To: <cd13188c-9e4b-635d-e582-ec10285c922d@mind.be>

Hello,

On Mon, 23 Aug 2021 22:55:30 +0200
Arnout Vandecappelle <arnout@mind.be> wrote:

>  I have a theory, but it's a bit far out... We basically have this:
> 
> gcc -o empty empty.c
> objcopy --dump-section .interp=/dev/stdout empty > loader.txt
> 
> The timestamp of 'empty' is going to be near the end of the gcc run. The
> timestamp of 'loader.txt', on the other hand, is going to be all the way at the
> beginning of the shell run. So, if the filesystem doesn't have nanosecond
> precision, it's possible that 'empty' and 'loader.txt' have the same timestamp.
> 
>  It's not a good theory, though, because make shouldn't consider 'loader.txt'
> older than 'empty' if they have exactly the same timestamp.
> 
> 
> 
>  Ooh, I just discovered something nasty! Apparently, objcopy updates the
> modification time of its input file...
> 
> $ touch empty; ls -l --full-time empty loader.txt; make SHARED=yes loader.txt;
> ls -l --full-time empty loader.txt
> -rwxr-xr-x 1 arnout arnout 24K 2021-08-23 22:53:27.450172624 +0200 empty*
> -rw-r--r-- 1 arnout arnout  28 2021-08-23 22:52:57.949935937 +0200 loader.txt
> objcopy --dump-section .interp=/dev/stdout empty > loader.txt
> -rwxr-xr-x 1 arnout arnout 24K 2021-08-23 22:53:27.563173530 +0200 empty*
> -rw-r--r-- 1 arnout arnout  28 2021-08-23 22:53:27.563173530 +0200 loader.txt
> 
> I guess this way there is some chance that loader.txt gets a modification time
> just before the updated mtime of empty...
> 
> So the solution would be to touch loader.txt just after creating it. We could
> patch it like that, give it a go in the autobuilders, then send the patch upstream?

Wow, great investigation! Really odd that objcopy updates the mtime of
its input file, though.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

  reply	other threads:[~2021-08-23 22:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18  6:57 [Buildroot] [autobuild.buildroot.net] Daily results for 2021-08-17 Thomas Petazzoni
2021-08-18 10:25 ` Thomas Petazzoni
2021-08-18 11:05   ` Yann E. MORIN
2021-08-18 20:18     ` Thomas Petazzoni
2021-08-18 21:04       ` Yann E. MORIN
2021-08-23 20:55         ` Arnout Vandecappelle
2021-08-23 22:06           ` Thomas Petazzoni [this message]
2021-08-23 22:16             ` Arnout Vandecappelle
2021-08-18 21:44 ` [Buildroot] Analysis of build " Thomas Petazzoni
2021-08-18 22:24   ` Giulio Benetti
2021-08-18 22:26     ` Giulio Benetti
2021-08-19  0:01     ` Giulio Benetti
2021-08-19 13:28     ` Thomas Petazzoni
2021-08-20 14:26       ` Giulio Benetti
2021-08-20 22:00         ` Giulio Benetti
2021-08-21 23:08     ` Giulio Benetti
2021-08-19  9:27   ` Arnout Vandecappelle
2021-08-19 13:24     ` Thomas Petazzoni

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=20210824000634.07d68905@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=arnout@mind.be \
    --cc=buildroot@buildroot.org \
    --cc=yann.morin.1998@free.fr \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.