wingo pushed a commit to branch wip-whippet
in repository guile.

commit 2d5d9f6ba94f34b13a59c2c76e31d1e6955f2e2d
Author: Andy Wingo <wi...@pobox.com>
AuthorDate: Wed Apr 16 13:48:36 2025 +0200

    Update for changes to Whippet build
    
    * libguile/Makefile.am (WHIPPET_EMBEDDER_H): Define this variable
    instead of using -include; otherwise we don't get the chance to set
    _LARGEFILE64_SOURCE before including Whippet files.
    (AM_CPPFLAGS): Simplify.
    (libguile_@GUILE_EFFECTIVE_VERSION@_la_DEPENDENCIES): Explicitly add
    libwhippet.la as a dependency.
    (noinst_HEADERS): Add gc-internal.h
    * libguile/gc-internal.h: New file.
    * libguile/gc.c: Include gc-internal.h.
---
 libguile/Makefile.am   |  7 ++++---
 libguile/gc-internal.h | 28 ++++++++++++++++++++++++++++
 libguile/gc.c          |  4 +++-
 3 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index cb4c095d1..285e4fb76 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -26,7 +26,7 @@ include $(top_srcdir)/am/snarf
 include lightening/lightening.am
 include whippet/embed.am
 
-WHIPPET_EMBEDDER_CPPFLAGS = -include $(srcdir)/whippet-embedder.h
+WHIPPET_EMBEDDER_H = $(srcdir)/whippet-embedder.h
 
 AUTOMAKE_OPTIONS = gnu
 
@@ -44,7 +44,7 @@ DEFAULT_INCLUDES =
 AM_CPPFLAGS = -DBUILDING_LIBGUILE=1 -I$(top_srcdir) -I$(top_builddir) \
              -I$(top_srcdir)/lib -I$(top_builddir)/lib -iquote$(builddir) \
              $(LIBFFI_CFLAGS)
-#AM_CPPFLAGS += $(WHIPPET_CPPFLAGS) $(WHIPPET_CFLAGS) 
$(WHIPPET_TO_EMBEDDER_CPPFLAGS)
+AM_CPPFLAGS += $(WHIPPET_CPPFLAGS)
 
 if ENABLE_JIT
 AM_CPPFLAGS += -I$(top_srcdir)/libguile/lightening
@@ -539,6 +539,7 @@ noinst_HEADERS = custom-ports.h                             
        \
                  quicksort.i.c                                  \
                  atomics-internal.h                            \
                  cache-internal.h                              \
+                 gc-internal.h                                 \
                  posix-w32.h                                   \
                 private-options.h                              \
                 ports-internal.h                               \
@@ -549,7 +550,7 @@ noinst_HEADERS = custom-ports.h                             
        \
 # vm instructions
 noinst_HEADERS += vm-engine.c
 
-libguile_@GUILE_EFFECTIVE_VERSION@_la_DEPENDENCIES = @LIBLOBJS@
+libguile_@GUILE_EFFECTIVE_VERSION@_la_DEPENDENCIES = @LIBLOBJS@ libwhippet.la
 
 libguile_@GUILE_EFFECTIVE_VERSION@_la_LIBADD =         \
   @LIBLOBJS@ $(gnulib_library) $(LTLIBGMP) $(LTLIBLTDL) libwhippet.la
diff --git a/libguile/gc-internal.h b/libguile/gc-internal.h
new file mode 100644
index 000000000..b7bbe641f
--- /dev/null
+++ b/libguile/gc-internal.h
@@ -0,0 +1,28 @@
+#ifndef SCM_GC_INTERNAL_H
+#define SCM_GC_INTERNAL_H
+
+/* Copyright 2025 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 <gc-api.h>
+
+
+
+#endif /* SCM_GC_INTERNAL_H */
diff --git a/libguile/gc.c b/libguile/gc.c
index 3cbe43ec5..e94ad3c42 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -1,4 +1,4 @@
-/* Copyright 1995-2003,2006,2008-2014,2016-2018,2020,2024
+/* Copyright 1995-2003,2006,2008-2014,2016-2018,2020,2024-2025
      Free Software Foundation, Inc.
 
    This file is part of Guile.
@@ -59,6 +59,8 @@
 #endif
 
 #include "gc.h"
+#include "gc-internal.h"
+
 
 /* For GC_set_start_callback.  */
 #include <gc/gc_mark.h>

Reply via email to