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
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)
.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!
#endif
};
-#ifdef HAVE_NATIVE_COMP
-
#include <dynlib.h>
struct Lisp_Native_Comp_Unit
dynlib_handle_ptr handle;
};
+#ifdef HAVE_NATIVE_COMP
+
INLINE bool
NATIVE_COMP_UNITP (Lisp_Object a)
{
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! */
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 =
subr->function.a0 = func;
break;
}
+#endif
case RELOC_BIGNUM:
{
struct Lisp_Bignum *bignum = dump_ptr (dump_base, reloc_offset);