aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mackenzie2022-10-02 20:31:12 +0000
committerAlan Mackenzie2022-10-02 20:31:12 +0000
commit3cc1706c63fde2e5a6313537817db2d32e829b6a (patch)
tree84a7cfc3a702bfc9a6dff026ed5c5a88e6856b41 /src
parentffce59b3ade02c696f06f73f81e2df2e5f72ae07 (diff)
downloademacs-3cc1706c63fde2e5a6313537817db2d32e829b6a.tar.gz
emacs-3cc1706c63fde2e5a6313537817db2d32e829b6a.zip
Suppress irritating/misleading message in make bootstrap about old .elc files
These are the "compile-first" .elc files, artificially given an old timestamp to cause them later to be native compiled. This fixes bug #58224. * lisp/Makefile.in (compile-first .el.elc): Give these .elc's the UTC epoch. Amend the comment. * src/lread.c (Fload): New variable, epoch_timestamp, initialized to binary zero. Compare with this the timestamp of .elc's being loaded, and if they match, don't output the message about the source file being newer than the file being loaded.
Diffstat (limited to 'src')
-rw-r--r--src/lread.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lread.c b/src/lread.c
index 51cbf811bab..dfa4d9afb51 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1423,6 +1423,7 @@ Return t if the file exists and loads successfully. */)
1423 struct stat s1, s2; 1423 struct stat s1, s2;
1424 int result; 1424 int result;
1425 1425
1426 struct timespec epoch_timespec = {(time_t)0, 0}; /* 1970-01-01T00:00 UTC */
1426 if (version < 0 && !(version = safe_to_load_version (file, fd))) 1427 if (version < 0 && !(version = safe_to_load_version (file, fd)))
1427 error ("File `%s' was not compiled in Emacs", SDATA (found)); 1428 error ("File `%s' was not compiled in Emacs", SDATA (found));
1428 1429
@@ -1451,7 +1452,12 @@ Return t if the file exists and loads successfully. */)
1451 newer = 1; 1452 newer = 1;
1452 1453
1453 /* If we won't print another message, mention this anyway. */ 1454 /* If we won't print another message, mention this anyway. */
1454 if (!NILP (nomessage) && !force_load_messages) 1455 if (!NILP (nomessage) && !force_load_messages
1456 /* We don't want this message during
1457 bootstrapping for the "compile-first" .elc
1458 files, which have had their timestamps set to
1459 the epoch. See bug #58224. */
1460 && timespec_cmp (get_stat_mtime (&s1), epoch_timespec))
1455 { 1461 {
1456 Lisp_Object msg_file; 1462 Lisp_Object msg_file;
1457 msg_file = Fsubstring (found, make_fixnum (0), make_fixnum (-1)); 1463 msg_file = Fsubstring (found, make_fixnum (0), make_fixnum (-1));