summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in2
-rw-r--r--src/comp.c21
-rw-r--r--src/comp.h2
-rw-r--r--src/pdumper.c15
4 files changed, 26 insertions, 14 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 7380a87644b..31a5a7e7709 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -587,7 +587,7 @@ endif
ifeq ($(DUMPING),pdumper)
$(pdmp): emacs$(EXEEXT)
LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=pdump \
- --bin-dest $(BIN_DESTDIR) --lisp-dest $(LISP_DESTDIR)
+ --bin-dest $(BIN_DESTDIR) --eln-dest $(ELN_DESTDIR)
cp -f $@ $(bootstrap_pdmp)
endif
diff --git a/src/comp.c b/src/comp.c
index b795afae351..d42bb4f8eb5 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -4529,6 +4529,27 @@ maybe_defer_native_compilation (Lisp_Object function_name,
/* Functions used to load eln files. */
/**************************************/
+/* Fixup the system eln-cache dir. This is the last entry in
+ `comp-eln-load-path'. */
+void
+fixup_eln_load_path (Lisp_Object directory)
+{
+ Lisp_Object last_cell = Qnil;
+ Lisp_Object tmp = Vcomp_eln_load_path;
+ FOR_EACH_TAIL (tmp)
+ if (CONSP (tmp))
+ last_cell = tmp;
+
+ Lisp_Object eln_cache_sys =
+ Ffile_name_directory (concat2 (Vinvocation_directory,
+ directory));
+ /* One directory up... */
+ eln_cache_sys =
+ Ffile_name_directory (Fsubstring (eln_cache_sys, Qnil,
+ make_fixnum (-1)));
+ Fsetcar (last_cell, eln_cache_sys);
+}
+
typedef char *(*comp_lit_str_func) (void);
/* Deserialize read and return static object. */
diff --git a/src/comp.h b/src/comp.h
index 687e426b1ef..9270f8bf664 100644
--- a/src/comp.h
+++ b/src/comp.h
@@ -101,6 +101,8 @@ extern void dispose_all_remaining_comp_units (void);
extern void clean_package_user_dir_of_old_comp_units (void);
+extern void fixup_eln_load_path (Lisp_Object directory);
+
#else /* #ifdef HAVE_NATIVE_COMP */
static inline void
diff --git a/src/pdumper.c b/src/pdumper.c
index ca055a1327c..8172389a49b 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -5249,23 +5249,12 @@ dump_do_dump_relocation (const uintptr_t dump_base,
{
fclose (file);
installation_state = INSTALLED;
- /* FIXME Vcomp_eln_load_path = ?? */
+ fixup_eln_load_path (XCAR (comp_u->file));
}
else
{
installation_state = LOCAL_BUILD;
- /* Fixup `comp-eln-load-path' so emacs can be invoked
- position independently. */
- Lisp_Object eln_cache_sys =
- Ffile_name_directory (concat2 (Vinvocation_directory,
- XCDR (comp_u->file)));
- /* One directory up... */
- eln_cache_sys =
- Ffile_name_directory (Fsubstring (eln_cache_sys, Qnil,
- make_fixnum (-1)));
- /* FIXME for subsequent dumps we should fixup only the
- last entry. */
- Vcomp_eln_load_path = Fcons (eln_cache_sys, Qnil);
+ fixup_eln_load_path (XCDR (comp_u->file));
}
}