From 3cc1706c63fde2e5a6313537817db2d32e829b6a Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sun, 2 Oct 2022 20:31:12 +0000 Subject: 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. --- src/lread.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/lread.c') 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. */) struct stat s1, s2; int result; + struct timespec epoch_timespec = {(time_t)0, 0}; /* 1970-01-01T00:00 UTC */ if (version < 0 && !(version = safe_to_load_version (file, fd))) error ("File `%s' was not compiled in Emacs", SDATA (found)); @@ -1451,7 +1452,12 @@ Return t if the file exists and loads successfully. */) newer = 1; /* If we won't print another message, mention this anyway. */ - if (!NILP (nomessage) && !force_load_messages) + if (!NILP (nomessage) && !force_load_messages + /* We don't want this message during + bootstrapping for the "compile-first" .elc + files, which have had their timestamps set to + the epoch. See bug #58224. */ + && timespec_cmp (get_stat_mtime (&s1), epoch_timespec)) { Lisp_Object msg_file; msg_file = Fsubstring (found, make_fixnum (0), make_fixnum (-1)); -- cgit v1.2.3