diff options
Diffstat (limited to 'meta/recipes-devtools/autoconf/autoconf/backports/0006-Fix-timing-bug-on-high-speed-builds.patch')
-rw-r--r-- | meta/recipes-devtools/autoconf/autoconf/backports/0006-Fix-timing-bug-on-high-speed-builds.patch | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/meta/recipes-devtools/autoconf/autoconf/backports/0006-Fix-timing-bug-on-high-speed-builds.patch b/meta/recipes-devtools/autoconf/autoconf/backports/0006-Fix-timing-bug-on-high-speed-builds.patch deleted file mode 100644 index 53fb40b4df..0000000000 --- a/meta/recipes-devtools/autoconf/autoconf/backports/0006-Fix-timing-bug-on-high-speed-builds.patch +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | From 713d9822bbfb2923115065efaefed34a0113f8a1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Eggert <eggert@cs.ucla.edu> | ||
3 | Date: Sat, 1 Apr 2023 16:44:03 -0700 | ||
4 | Subject: [PATCH 06/29] Fix timing bug on high-speed builds | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Problem reported by Bogdan via Jacob Bachmeyer in: | ||
10 | https://lists.gnu.org/r/autoconf/2023-04/msg00002.html | ||
11 | * bin/autom4te.in: If a file timestamp equals a dependency’s | ||
12 | timestamp, consider the file to be out of date. Although this may | ||
13 | result in extra work, it fixes some rare timing bugs. | ||
14 | |||
15 | Upstream-Status: Backport | ||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | bin/autom4te.in | 12 +++++------- | ||
19 | 1 file changed, 5 insertions(+), 7 deletions(-) | ||
20 | |||
21 | diff --git a/bin/autom4te.in b/bin/autom4te.in | ||
22 | index 4b61f0a82..71d7e6a62 100644 | ||
23 | --- a/bin/autom4te.in | ||
24 | +++ b/bin/autom4te.in | ||
25 | @@ -910,10 +910,8 @@ sub up_to_date ($) | ||
26 | return 0 | ||
27 | if ! -f $tfile || ! -f $ofile; | ||
28 | |||
29 | - # The youngest of the cache files must be older than the oldest of | ||
30 | + # The younger of the cache files must be older than the oldest of | ||
31 | # the dependencies. | ||
32 | - # FIXME: These timestamps have only 1-second resolution. | ||
33 | - # Time::HiRes fixes this, but assumes Perl 5.8 or later. | ||
34 | my $tmtime = mtime ($tfile); | ||
35 | my $omtime = mtime ($ofile); | ||
36 | my ($file, $mtime) = ($tmtime < $omtime | ||
37 | @@ -926,7 +924,7 @@ sub up_to_date ($) | ||
38 | # We depend at least upon the arguments. | ||
39 | foreach my $dep (@ARGV) | ||
40 | { | ||
41 | - if ($mtime < mtime ($dep)) | ||
42 | + if ($mtime <= mtime ($dep)) | ||
43 | { | ||
44 | verb "up_to_date ($file): outdated: $dep"; | ||
45 | return 0; | ||
46 | @@ -949,7 +947,7 @@ sub up_to_date ($) | ||
47 | # timestamp of that missing file was newer). | ||
48 | return 0 | ||
49 | if ! $dep; | ||
50 | - if ($mtime < mtime ($dep)) | ||
51 | + if ($mtime <= mtime ($dep)) | ||
52 | { | ||
53 | verb "up_to_date ($file): outdated: $dep"; | ||
54 | return 0; | ||
55 | @@ -1038,7 +1036,7 @@ $icache_file = new Autom4te::XFile $icache, O_RDWR|O_CREAT; | ||
56 | $icache_file->lock (LOCK_EX) | ||
57 | if ($flock_implemented eq "yes"); | ||
58 | |||
59 | -# Read the cache index if available and older than autom4te itself. | ||
60 | +# Read the cache index if available and younger than autom4te itself. | ||
61 | # If autom4te is younger, then some structures such as C4che might | ||
62 | # have changed, which would corrupt its processing. | ||
63 | Autom4te::C4che->load ($icache_file) | ||
64 | @@ -1105,7 +1103,7 @@ else | ||
65 | # Actual M4 expansion, if the user wants it, or if $output is old | ||
66 | # (STDOUT is pretty old). | ||
67 | handle_output ($req, $output) | ||
68 | - if $force || mtime ($output) < mtime ($ocache . $req->id); | ||
69 | + if $force || mtime ($output) <= mtime ($ocache . $req->id); | ||
70 | } | ||
71 | |||
72 | # If we ran up to here, the cache is valid. | ||
73 | -- | ||
74 | 2.41.0 | ||
75 | |||