summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2018-07-02 11:08:57 +0200
committerAndy Wingo <wingo@pobox.com>2018-07-02 11:08:57 +0200
commit9338ef15c223c3188d627d9756f4180ed59777dd (patch)
tree1475e13c0cb94514bb51c8bb400058d26e5ed203
parent2d8480388463f4a520823533b3de65120a2ae413 (diff)
downloadguile-9338ef15c223c3188d627d9756f4180ed59777dd.tar.gz
Wire up lightning into libguile build
* libguile/Makefile.am (AM_CPPFLAGS): (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): If ENABLE_JIT, build lightning. (EXTRA_DIST): Add lightning files. * libguile/lightning/lightning.am (lightning_extra_files): Add COPYING and related files to the dist. * libguile/jit.c: * libguile/jit.h: New files.
-rw-r--r--libguile/Makefile.am14
-rw-r--r--libguile/jit.c34
-rw-r--r--libguile/jit.h31
-rw-r--r--libguile/lightning/lightning.am13
4 files changed, 88 insertions, 4 deletions
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index 4e782f215..888146ead 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -21,6 +21,7 @@
## Fifth Floor, Boston, MA 02110-1301 USA
include $(top_srcdir)/am/snarf
+include $(top_srcdir)/libguile/lightning/lightning.am
AUTOMAKE_OPTIONS = gnu
@@ -38,6 +39,10 @@ DEFAULT_INCLUDES =
AM_CPPFLAGS = -DBUILDING_LIBGUILE=1 -I$(top_srcdir) -I$(top_builddir) \
-I$(top_srcdir)/lib -I$(top_builddir)/lib $(LIBFFI_CFLAGS)
+if ENABLE_JIT
+AM_CPPFLAGS += -I$(top_srcdir)/libguile/lightning/include
+endif
+
AM_CFLAGS = $(GCC_CFLAGS) $(CFLAG_VISIBILITY)
## The Gnulib Libtool archive.
@@ -170,6 +175,7 @@ libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = \
instructions.c \
intrinsics.c \
ioext.c \
+ jit.c \
keywords.c \
list.c \
load.c \
@@ -230,6 +236,10 @@ libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = \
weak-table.c \
weak-vector.c
+if ENABLE_JIT
+libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES += $(lightning_c_files)
+endif
+
DOT_X_FILES = \
alist.x \
array-handle.x \
@@ -634,6 +644,7 @@ modinclude_HEADERS = \
instructions.h \
ioext.h \
iselect.h \
+ jit.h \
keywords.h \
list.h \
load.h \
@@ -716,7 +727,8 @@ EXTRA_DIST = ChangeLog-scm ChangeLog-threads \
cpp-E.syms cpp-E.c cpp-SIG.syms cpp-SIG.c \
c-tokenize.lex \
scmconfig.h.top libgettext.h unidata_to_charset.pl libguile.map \
- vm-operations.h libguile-2.2-gdb.scm
+ vm-operations.h libguile-2.2-gdb.scm \
+ $(lightning_c_files) $(lightning_extra_files)
# $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) \
# guile-procedures.txt guile.texi
diff --git a/libguile/jit.c b/libguile/jit.c
new file mode 100644
index 000000000..f1195d2fa
--- /dev/null
+++ b/libguile/jit.c
@@ -0,0 +1,34 @@
+/* Copyright 2018
+ Free Software Foundation, Inc.
+
+ This file is part of Guile.
+
+ Guile is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Guile is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with Guile. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if ENABLE_JIT
+#include <lightning.h>
+#endif
+
+#include "jit.h"
+
+void
+scm_init_jit (void)
+{
+}
diff --git a/libguile/jit.h b/libguile/jit.h
new file mode 100644
index 000000000..1c27e8628
--- /dev/null
+++ b/libguile/jit.h
@@ -0,0 +1,31 @@
+#ifndef SCM_JIT_H
+#define SCM_JIT_H
+
+/* Copyright 2018
+ Free Software Foundation, Inc.
+
+ This file is part of Guile.
+
+ Guile is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Guile is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with Guile. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+
+
+#include "libguile/scm.h"
+
+
+
+SCM_INTERNAL void scm_init_jit (void);
+
+#endif /* SCM_JIT_H */
diff --git a/libguile/lightning/lightning.am b/libguile/lightning/lightning.am
index 3b96a201c..428b4236d 100644
--- a/libguile/lightning/lightning.am
+++ b/libguile/lightning/lightning.am
@@ -16,9 +16,6 @@
lightning = $(top_srcdir)/libguile/lightning
-# FIXME: define in C files: -D_GNU_SOURCE
-# FIXME: set LIGHTNING_CFLAGS=-I$(lightning)/include in configure.ac
-
lightning_c_files = \
$(lightning)/lib/jit_memory.c \
$(lightning)/lib/jit_names.c \
@@ -28,6 +25,16 @@ lightning_c_files = \
$(lightning)/lib/lightning.c
lightning_extra_files = \
+ $(lightning)/AUTHORS \
+ $(lightning)/ChangeLog \
+ $(lightning)/COPYING \
+ $(lightning)/COPYING.LESSER \
+ $(lightning)/lightning.am \
+ $(lightning)/NEWS \
+ $(lightning)/README \
+ $(lightning)/THANKS \
+ $(lightning)/TODO \
+ \
$(lightning)/include/lightning.h \
$(lightning)/include/lightning/jit_private.h \
$(lightning)/include/lightning/jit_arm.h \