guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 437/437: Wire up lightning into libguile build


From: Andy Wingo
Subject: [Guile-commits] 437/437: Wire up lightning into libguile build
Date: Mon, 2 Jul 2018 05:15:13 -0400 (EDT)

wingo pushed a commit to branch lightning
in repository guile.

commit 9338ef15c223c3188d627d9756f4180ed59777dd
Author: Andy Wingo <address@hidden>
Date:   Mon Jul 2 11:08:57 2018 +0200

    Wire up lightning into libguile build
    
    * libguile/Makefile.am (AM_CPPFLAGS):
      (address@hidden@_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.
---
 libguile/Makefile.am            | 14 +++++++++++++-
 libguile/jit.c                  | 34 ++++++++++++++++++++++++++++++++++
 libguile/jit.h                  | 31 +++++++++++++++++++++++++++++++
 libguile/lightning/lightning.am | 13 ++++++++++---
 4 files changed, 88 insertions(+), 4 deletions(-)

diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index 4e782f2..888146e 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 @@ address@hidden@_la_SOURCES =                                
\
        instructions.c                          \
        intrinsics.c                            \
        ioext.c                                 \
+       jit.c                                   \
        keywords.c                              \
        list.c                                  \
        load.c                                  \
@@ -230,6 +236,10 @@ address@hidden@_la_SOURCES =                               
\
        weak-table.c                            \
        weak-vector.c
 
+if ENABLE_JIT
address@hidden@_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 0000000..f1195d2
--- /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 0000000..1c27e86
--- /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 3b96a20..428b423 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        \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]