1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-03 18:50:19 +02:00

Remove the last direct uses of BDW API

* configure.ac: Remove code to detect BDW, that is taken care of by the
whippet macros.  Remove support for ia64, for the moment at least,
perhaps for good.
* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS):
Remove BDW cflags.
(modinclude_HEADERS): Remove bdw-gc.h.
* libguile/bdw-gc.h: Remove.
* libguile/fluids.c:
* libguile/hashtab.c:
* libguile/numbers.c:
* libguile/smob.c:
* libguile/srfi-4.c:
* libguile/struct.c:
* libguile/vectors.c:
* libguile/vm.c: Remove bdw-gc.h includes.
* meta/guile-4.0-uninstalled.pc.in (Libs):
* meta/guile-4.0.pc.in (Libs): Remove direct dependency on BDW-GC, as it
is all encapsulated through Whippet, which is not publically exposed.
This commit is contained in:
Andy Wingo 2025-05-15 16:13:18 +02:00
parent c9df342c9a
commit ddef73d03f
13 changed files with 11 additions and 113 deletions

View file

@ -1109,36 +1109,10 @@ main (int argc, char **argv)
WHIPPET_PKG_COLLECTOR(bdw)
WHIPPET_PKG
#--------------------------------------------------------------------
#
# Boehm's GC library
#
#--------------------------------------------------------------------
AC_MSG_CHECKING(for which bdw-gc pkg-config file to use)
AC_ARG_WITH(bdw_gc, [ --with-bdw-gc=PKG name of BDW-GC pkg-config file],
[bdw_gc="$withval"], [bdw_gc=bdw-gc])
AC_MSG_RESULT($bdw_gc)
PKG_CHECK_MODULES([BDW_GC], [$bdw_gc >= 7.2])
save_LIBS="$LIBS"
LIBS="$BDW_GC_LIBS $LIBS"
CFLAGS="$BDW_GC_CFLAGS $CFLAGS"
# Functions that might not be defined, depending on configuration.
AC_CHECK_FUNCS([GC_pthread_exit GC_pthread_cancel GC_pthread_sigmask])
# Functions from GC 7.3.
AC_CHECK_FUNCS([GC_move_disappearing_link GC_is_heap_ptr])
# See if there's an auxiliary stack, as in ia64.
AC_CHECK_MEMBER([struct GC_stack_base.reg_base],
[SCM_I_GSC_HAVE_AUXILIARY_STACK=1], [SCM_I_GSC_HAVE_AUXILIARY_STACK=0],
[#include <gc/gc.h>])
# Machines with an auxiliary stack (ia64) are not supported.
SCM_I_GSC_HAVE_AUXILIARY_STACK=0
AC_SUBST([SCM_I_GSC_HAVE_AUXILIARY_STACK])
LIBS="$save_LIBS"
AC_CHECK_SIZEOF(float)
if test "$ac_cv_sizeof_float" -le "$ac_cv_sizeof_long"; then
AC_DEFINE([SCM_SINGLES], 1,

View file

@ -546,7 +546,7 @@ libguile_@GUILE_EFFECTIVE_VERSION@_la_LIBADD = \
version_info = @LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@
libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS = \
$(BDW_GC_LIBS) $(LIBFFI_LIBS) \
$(LIBFFI_LIBS) \
$(CEIL_LIBM) \
$(FLOOR_LIBM) \
$(FREXP_LIBM) \
@ -594,7 +594,6 @@ modinclude_HEADERS = \
async.h \
atomic.h \
backtrace.h \
bdw-gc.h \
boolean.h \
bitvectors.h \
bytevectors.h \

View file

@ -1,65 +0,0 @@
#ifndef SCM_BDW_GC_H
#define SCM_BDW_GC_H
/* Copyright 2006,2008-2009,2011-2014,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/>. */
/* Correct header inclusion. */
#include "libguile/scmconfig.h"
#if SCM_USE_PTHREAD_THREADS
/* When pthreads are used, let `libgc' know about it and redirect allocation
calls such as `GC_MALLOC ()' to (contention-free, faster) thread-local
allocation. */
# define GC_THREADS 1
# define GC_REDIRECT_TO_LOCAL 1
/* Don't #define pthread routines to their GC_pthread counterparts.
Instead we will be careful inside Guile to use the GC_pthread
routines. */
# define GC_NO_THREAD_REDIRECTS 1
#ifdef __MINGW32__
/* Rely on pthreads-w32. */
#define GC_WIN32_PTHREADS
#endif
#endif
#include <gc/gc.h>
/* Return true if PTR points to the heap. */
#define SCM_I_IS_POINTER_TO_THE_HEAP(ptr) \
(GC_base (ptr) != NULL)
/* Register a disappearing link for the object pointed to by OBJ such that
the pointer pointed to be LINK is cleared when OBJ is reclaimed. Do so
only if OBJ actually points to the heap. See
http://thread.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/2563
for details. */
#define SCM_I_REGISTER_DISAPPEARING_LINK(link, obj) \
((SCM_I_IS_POINTER_TO_THE_HEAP (obj)) \
? GC_GENERAL_REGISTER_DISAPPEARING_LINK ((link), (obj)) \
: 0)
#endif /* SCM_BDW_GC_H */

View file

@ -26,7 +26,6 @@
#include "alist.h"
#include "atomics-internal.h"
#include "bdw-gc.h"
#include "cache-internal.h"
#include "deprecation.h"
#include "dynwind.h"

View file

@ -28,7 +28,6 @@
#include <stdio.h>
#include "alist.h"
#include "bdw-gc.h"
#include "boolean.h"
#include "deprecation.h"
#include "eq.h"

View file

@ -1,4 +1,4 @@
/* Copyright 1995-2016,2018-2022
/* Copyright 1995-2016,2018-2022,2025
Free Software Foundation, Inc.
Portions Copyright 1990-1993 by AT&T Bell Laboratories and Bellcore.
@ -57,7 +57,6 @@
#include <complex.h>
#endif
#include "bdw-gc.h"
#include "boolean.h"
#include "deprecation.h"
#include "dynwind.h"

View file

@ -30,7 +30,6 @@
#include "async.h"
#include "atomics-internal.h"
#include "bdw-gc.h"
#include "finalizers.h"
#include "goops.h"
#include "gsubr.h"

View file

@ -1,6 +1,6 @@
/* srfi-4.c --- Uniform numeric vector datatypes.
Copyright 2001,2004,2006,2009-2011,2014,2018
Copyright 2001,2004,2006,2009-2011,2014,2018,2025
Free Software Foundation, Inc.
This file is part of Guile.
@ -25,7 +25,6 @@
#include <string.h>
#include "bdw-gc.h"
#include "boolean.h"
#include "bytevectors.h"
#include "error.h"

View file

@ -31,7 +31,6 @@
#include "alist.h"
#include "async.h"
#include "bdw-gc.h"
#include "boolean.h"
#include "chars.h"
#include "deprecation.h"

View file

@ -27,7 +27,6 @@
#include <string.h>
#include "array-handle.h"
#include "bdw-gc.h"
#include "boolean.h"
#include "deprecation.h"
#include "eq.h"

View file

@ -39,7 +39,6 @@
#include "async.h"
#include "atomic.h"
#include "atomics-internal.h"
#include "bdw-gc.h"
#include "cache-internal.h"
#include "continuations.h"
#include "control.h"
@ -79,8 +78,6 @@
#include "vm.h"
#include <gc/gc_mark.h>
#if (defined __GNUC__)
# define SCM_NOINLINE __attribute__ ((__noinline__))
#else

View file

@ -4,9 +4,9 @@ srcdir=@abs_top_srcdir@
Name: GNU Guile (uninstalled)
Description: GNU's Ubiquitous Intelligent Language for Extension (uninstalled)
Version: @GUILE_VERSION@
Libs: -L${builddir}/libguile -lguile-@GUILE_EFFECTIVE_VERSION@ @BDW_GC_LIBS@
Libs: -L${builddir}/libguile -lguile-@GUILE_EFFECTIVE_VERSION@
Libs.private: @LIB_CLOCK_GETTIME@ @LIB_GETRANDOM@ @LIBGMP@ @LIBLTDL@ \
@LIBFFI_LIBS@ @LIBUNISTRING@ @GUILE_LIBS@ @LIBICONV@ @LIBINTL@ \
@LIBSOCKET@ @SERVENT_LIB@ @HOSTENT_LIB@ @GETADDRINFO_LIB@ \
@INET_NTOP_LIB@ @INET_PTON_LIB@
Cflags: -I${srcdir} -I${builddir} @GUILE_CFLAGS@ @BDW_GC_CFLAGS@
@INET_NTOP_LIB@ @INET_PTON_LIB@ @WHIPPET_BDW_LIBS@
Cflags: -I${srcdir} -I${builddir} @GUILE_CFLAGS@

View file

@ -22,9 +22,9 @@ guile=${bindir}/@guile@
Name: GNU Guile
Description: GNU's Ubiquitous Intelligent Language for Extension
Version: @GUILE_VERSION@
Libs: -L${libdir} -lguile-@GUILE_EFFECTIVE_VERSION@ @BDW_GC_LIBS@
Libs: -L${libdir} -lguile-@GUILE_EFFECTIVE_VERSION@
Libs.private: @LIB_CLOCK_GETTIME@ @LIB_GETRANDOM@ @LIBGMP@ @LIBLTDL@ \
@LIBFFI_LIBS@ @LIBUNISTRING@ @GUILE_LIBS@ @LIBICONV@ @LIBINTL@ \
@LIBSOCKET@ @SERVENT_LIB@ @HOSTENT_LIB@ @GETADDRINFO_LIB@ \
@INET_NTOP_LIB@ @INET_PTON_LIB@
Cflags: -I${pkgincludedir}/@GUILE_EFFECTIVE_VERSION@ @GUILE_CFLAGS@ @BDW_GC_CFLAGS@
@INET_NTOP_LIB@ @INET_PTON_LIB@ @WHIPPET_BDW_LIBS@
Cflags: -I${pkgincludedir}/@GUILE_EFFECTIVE_VERSION@ @GUILE_CFLAGS@