Subject: bug#52912: 29.0.50; Left over files from native compilation

From: Eli Zaretskii <[email-masked]>
Date: Sat, 22 Jan 2022 12:26:18 +0200

> From: Andrea Corallo <[email-masked]>
> Date: Wed, 19 Jan 2022 21:09:44 +0000
> Cc: [email-masked], [email-masked]
> 
> Lars Ingebrigtsen <[email-masked]> writes:
> 
> > Andrea Corallo <[email-masked]> writes:
> >
> >> Yes I think we could postpone not only the renaming of the temporary
> >> .elc but also when this is written down.
> >>
> >> I'll try to code up something this week.
> >
> > Great!
> 
> Okay as of 9396b7d0b4 when native compiling we produce the temp .elc
> only just before renaming it, so exactly as we do for simple byte
> compilation.
> 
> This should really minimize this issue to a most likely non observable
> frequency.
> 
> I bootstrapped emacs native and byte compiled and seems to work here.

Looks like this causes trouble, at least when rebuilding Emacs: now
the .elc file is slightly (by 0.1 sec in my case) newer than the
corresponding .eln file, and loadup loads the .elc file instead of
.eln.  If I manually swap the time stamps of the .elc and .eln files,
the problem goes away.

When you bootstrapped the native-compiled Emacs, did you make sure
loadup announced that it was loading "native compiled lisp" files?