1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-29 22:40:34 +02:00

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.
This commit is contained in:
Andy Wingo 2018-07-02 11:08:57 +02:00
parent 2d84803884
commit 9338ef15c2
4 changed files with 88 additions and 4 deletions

View file

@ -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

34
libguile/jit.c Normal file
View file

@ -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)
{
}

31
libguile/jit.h Normal file
View file

@ -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 */

View file

@ -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 \