emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finalizing 'inhibit-automatic-native-compilation'


From: Stefan Monnier
Subject: Re: Finalizing 'inhibit-automatic-native-compilation'
Date: Fri, 27 Jan 2023 18:57:20 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

> Please respond soon, so as not to delay the pretest of Emacs 29.

AFAICT the main issue is how to handle the case where the home directory
is not writable (or doesn't exist).  I think the Debian packaging needs
mostly stem from this.

For "normal" compilation, we should just make sure that in the absence
of a writable eln cache Emacs still behaves correctly, i.e. it should
just load the `.elc` file and move on (without native-compiling it).

For trampolines, in the short term we should probably add a fallback to
use an eln-cache in the `temporary-file-directory` (i.e. use the code
we currently use when `inhibit-automatic-native-compilation` is non-nil).

I think together this should let Debian get the behavior they want, by
setting HOME to /doesntexist.  And that should make both
`inhibit-automatic-native-compilation` and
`EMACS_INHIBIT_AUTOMATIC_NATIVE_COMPILATION` unnecessary.

There are still some problems after that:

- HOME is ignored when the user is root (Emacs uses something like
  ~root/ or ~$LOGNAME/ instead).  I think we should throw away this
  (mis)feature, but I understand some people like it when they use `su`.
  Maybe a workaround is to tweak that (mis)feature so HOME is only
  ignored if it points a directory that belongs to another user, or so
  HOME is not ignored when it points nowhere.

- There's of course the problem of needing to compile trampolines when
  GCC is absent.  The current `make trampolines` kind of solves that,
  but it's ridiculously inefficient (the code for the trampolines is
  trivially small, compared to the size of the generated `.eln`
  trampoline files).  Maybe a better solution is to precompile the
  trampoline when we generate a `.eln` that may need a trampoline, so
  that the (small) trampoline code is directly included in the normal
  `.eln` file.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]