From 17259826f263f87d45eb98c8effe0ba7ee774f5d Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 8 Sep 2019 09:40:42 +0200 Subject: [PATCH] fix build system for native compiler option --- configure.ac | 10 +++++++--- src/Makefile.in | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 6213051a602..a36a2f32428 100644 --- a/configure.ac +++ b/configure.ac @@ -3671,18 +3671,22 @@ if test "${HAVE_ZLIB}" = "yes"; then fi AC_SUBST(LIBZ) +### Emacs Lisp native compiler support HAVE_LIBGCCJIT=no LIBGCCJIT_LIB= +COMP_OBJ= if test "${with_nativecomp}" != "no"; then AC_CHECK_LIB(gccjit, gcc_jit_context_acquire, HAVE_LIBGCCJIT=yes, , -lgccjit) if test "${HAVE_LIBGCCJIT}" = "yes"; then - LIBGCCJIT_LIB=-lgccjit - AC_DEFINE([HAVE_LIBGCCJIT], 1, [Define to 1 if you have the libgccjit library (-lgccjit).]) + LIBGCCJIT_LIB="-lgccjit -ldl" + COMP_OBJ="dynlib.o comp.o" + AC_DEFINE(HAVE_LIBGCCJIT, 1, [Define to 1 if you have the libgccjit library (-lgccjit).]) AC_DEFINE_UNQUOTED(NATIVE_ELISP_SUFFIX, ".eln", [System extension for native compiled elisp]) fi fi -AC_SUBST([LIBGCCJIT_LIB]) +AC_SUBST(LIBGCCJIT_LIB) +AC_SUBST(COMP_OBJ) ### Dynamic modules support LIBMODULES= diff --git a/src/Makefile.in b/src/Makefile.in index 5e0e36d8b4d..6c65275d6da 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -327,6 +327,8 @@ GMP_LIB = @GMP_LIB@ GMP_OBJ = @GMP_OBJ@ LIBGCCJIT = @LIBGCCJIT_LIB@ +## dynlib.o comp.o if native compiler is enabled, else empty +COMP_OBJ = @COMP_OBJ@ RUN_TEMACS = ./temacs @@ -416,7 +418,7 @@ base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ cmds.o casetab.o casefiddle.o indent.o search.o regex-emacs.o undo.o \ alloc.o pdumper.o data.o doc.o editfns.o callint.o \ eval.o floatfns.o fns.o font.o print.o lread.o $(MODULES_OBJ) \ - syntax.o $(UNEXEC_OBJ) bytecode.o comp.o \ + syntax.o $(UNEXEC_OBJ) bytecode.o $(COMP_OBJ) \ process.o gnutls.o callproc.o \ region-cache.o sound.o timefns.o atimer.o \ doprnt.o intervals.o textprop.o composite.o xml.o lcms.o $(NOTIFY_OBJ) \ -- 2.39.5