]> git.eshelyaron.com Git - emacs.git/commitdiff
make standard emacs compilable again
authorAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 20:13:13 +0000 (21:13 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:38:19 +0000 (11:38 +0100)
configure.ac
lisp/Makefile.in
src/comp.h
src/lread.c
src/pdumper.c

index 8c8b57c10796eea640d4bfd161609f7a42576c88..247484a8501c044ce49a6500da0fdf29569fa685 100644 (file)
@@ -3748,8 +3748,6 @@ if test "${with_nativecomp}" != "no"; then
     LIBGCCJIT_LIB="-lgccjit -ldl"
     COMP_OBJ+=comp.o
     AC_DEFINE(HAVE_NATIVE_COMP, 1, [Define to 1 if you have the libgccjit library (-lgccjit).])
-    AC_DEFINE_UNQUOTED(NATIVE_ELISP_SUFFIX, ".eln",
-     [System extension for native compiled elisp])
   else
     AC_MSG_ERROR([elisp native compiler requested but libgccjit not found.
 If you are sure you want Emacs compiled without elisp native compiler, pass
@@ -3757,6 +3755,8 @@ If you are sure you want Emacs compiled without elisp native compiler, pass
 to configure.])
   fi
 fi
+AC_DEFINE_UNQUOTED(NATIVE_ELISP_SUFFIX, ".eln",
+  [System extension for native compiled elisp])
 AC_SUBST(HAVE_NATIVE_COMP)
 AC_SUBST(LIBGCCJIT_LIB)
 AC_SUBST(COMP_OBJ)
index cfc6f4949910017ee7d8b1dd7c8889cac1761334..5793b6474dc6ffe5574bd59dd65af141d777ae45 100644 (file)
@@ -332,7 +332,13 @@ compile-first: $(COMPILE_FIRST)
 
 .PHONY: compile-targets
 # TARGETS is set dynamically in the recursive call from 'compile-main'.
+# Do not build comp.el unless necessary not to exceed max-specpdl-size and
+# max-lisp-eval-depth in normal builds.
+ifneq ($(HAVE_NATIVE_COMP),yes)
+compile-targets: $(filter-out ./emacs-lisp/comp.elc,$(TARGETS))
+else
 compile-targets: $(TARGETS)
+endif
 
 # Compile all the Elisp files that need it.  Beware: it approximates
 # 'no-byte-compile', so watch out for false-positives!
index 33b735480090fa75a8bf5f088d38ee9592a0097e..86fa54f515851bab8a09d889a0602439a1f9d548 100644 (file)
@@ -29,8 +29,6 @@ enum {
 #endif
 };
 
-#ifdef HAVE_NATIVE_COMP
-
 #include <dynlib.h>
 
 struct Lisp_Native_Comp_Unit
@@ -43,6 +41,8 @@ struct Lisp_Native_Comp_Unit
   dynlib_handle_ptr handle;
 };
 
+#ifdef HAVE_NATIVE_COMP
+
 INLINE bool
 NATIVE_COMP_UNITP (Lisp_Object a)
 {
index 1c5268d0dadb4adcf8906fd726d304bb83d1b994..d6d138614177108553d82518b2867e950a155d12 100644 (file)
@@ -4464,8 +4464,9 @@ defsubr (union Aligned_Lisp_Subr *aname)
   XSETPVECTYPE (sname, PVEC_SUBR);
   XSETSUBR (tem, sname);
   set_symbol_function (sym, tem);
-  if (NATIVE_COMP_FLAG)
-    Vcomp_subr_list = Fcons (tem, Vcomp_subr_list);
+#ifdef HAVE_NATIVE_COMP
+  Vcomp_subr_list = Fcons (tem, Vcomp_subr_list);
+#endif
 }
 
 #ifdef NOTDEF /* Use fset in subr.el now!  */
index 85809c9978f7542955fb8ba430e7058c12eed279..ae8fe014e0eb5e5992a88bde4761142862bc3141 100644 (file)
@@ -5296,6 +5296,7 @@ dump_do_dump_relocation (const uintptr_t dump_base,
         dump_write_word_to_dump (dump_base, reloc_offset, value);
         break;
       }
+#ifdef HAVE_NATIVE_COMP
     case RELOC_NATIVE_COMP_UNIT:
       {
        struct Lisp_Native_Comp_Unit *comp_u =
@@ -5323,6 +5324,7 @@ dump_do_dump_relocation (const uintptr_t dump_base,
        subr->function.a0 = func;
        break;
       }
+#endif
     case RELOC_BIGNUM:
       {
         struct Lisp_Bignum *bignum = dump_ptr (dump_base, reloc_offset);