aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrea Corallo2020-06-06 13:00:45 +0100
committerAndrea Corallo2020-06-06 13:06:29 +0100
commit385d9e69740e4f6293fe4c7b4206e3a4aca6ca21 (patch)
tree83e9ef8ef93daef708adf3f5e6999205eb17e277 /src
parent5684b3420d73715836c5111ef1f6ec9e4e257e8f (diff)
downloademacs-385d9e69740e4f6293fe4c7b4206e3a4aca6ca21.tar.gz
emacs-385d9e69740e4f6293fe4c7b4206e3a4aca6ca21.zip
Some fixes for --without-nativecomp config
* src/pdumper.c (dump_subr): Do not add RELOC_NATIVE_SUBR for VERY_LATE_RELOCS in --without-nativecomp. (dump_do_dump_relocation): Add a sanity check that no RELOC_NATIVE_SUBR exists in --without-nativecomp. * src/lread.c (Fload): As Fnative_elisp_load is not defined in --without-nativecomp so ifdef this block.
Diffstat (limited to 'src')
-rw-r--r--src/lread.c6
-rw-r--r--src/pdumper.c8
2 files changed, 13 insertions, 1 deletions
diff --git a/src/lread.c b/src/lread.c
index 026f3b6d98f..192c7ba773a 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1507,6 +1507,7 @@ Return t if the file exists and loads successfully. */)
1507 } 1507 }
1508 else if (is_native_elisp) 1508 else if (is_native_elisp)
1509 { 1509 {
1510#ifdef HAVE_NATIVE_COMP
1510 specbind (Qcurrent_load_list, Qnil); 1511 specbind (Qcurrent_load_list, Qnil);
1511 if (!NILP (Vpurify_flag)) 1512 if (!NILP (Vpurify_flag))
1512 { 1513 {
@@ -1517,6 +1518,11 @@ Return t if the file exists and loads successfully. */)
1517 LOADHIST_ATTACH (hist_file_name); 1518 LOADHIST_ATTACH (hist_file_name);
1518 Fnative_elisp_load (found, Qnil); 1519 Fnative_elisp_load (found, Qnil);
1519 build_load_history (hist_file_name, true); 1520 build_load_history (hist_file_name, true);
1521#else
1522 /* This cannot happen. */
1523 emacs_abort ();
1524#endif
1525
1520 } 1526 }
1521 else 1527 else
1522 { 1528 {
diff --git a/src/pdumper.c b/src/pdumper.c
index ffe59fbb306..92ac96a8faa 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -2967,7 +2967,9 @@ dump_subr (struct dump_context *ctx, const struct Lisp_Subr *subr)
2967 dump_field_lv (ctx, &out, subr, &subr->native_comp_u[0], WEIGHT_NORMAL); 2967 dump_field_lv (ctx, &out, subr, &subr->native_comp_u[0], WEIGHT_NORMAL);
2968 2968
2969 dump_off subr_off = dump_object_finish (ctx, &out, sizeof (out)); 2969 dump_off subr_off = dump_object_finish (ctx, &out, sizeof (out));
2970 if (ctx->flags.dump_object_contents && !NILP (subr->native_comp_u[0])) 2970 if (NATIVE_COMP_FLAG
2971 && ctx->flags.dump_object_contents
2972 && !NILP (subr->native_comp_u[0]))
2971 /* We'll do the final addr relocation during VERY_LATE_RELOCS time 2973 /* We'll do the final addr relocation during VERY_LATE_RELOCS time
2972 after the compilation units has been loaded. */ 2974 after the compilation units has been loaded. */
2973 dump_push (&ctx->dump_relocs[VERY_LATE_RELOCS], 2975 dump_push (&ctx->dump_relocs[VERY_LATE_RELOCS],
@@ -5331,6 +5333,10 @@ dump_do_dump_relocation (const uintptr_t dump_base,
5331 } 5333 }
5332 case RELOC_NATIVE_SUBR: 5334 case RELOC_NATIVE_SUBR:
5333 { 5335 {
5336 if (!NATIVE_COMP_FLAG)
5337 /* This cannot happen. */
5338 emacs_abort ();
5339
5334 /* When resurrecting from a dump given non all the original 5340 /* When resurrecting from a dump given non all the original
5335 native compiled subrs may be still around we can't rely on 5341 native compiled subrs may be still around we can't rely on
5336 a 'top_level_run' mechanism, we revive them one-by-one 5342 a 'top_level_run' mechanism, we revive them one-by-one