This has not been supported for a while, so remove it.
#
libgc_configure_args=
-if test -d $srcdir/libgc ; then
- libgc_default=included
-else
- libgc_default=boehm
-fi
-
# These variables are the CPPFLAGS/CFLAGS passed to libgc's configure
# libgc should inherit the original CFLAGS/CPPFLAGS passed to configure, i.e. -O0
CPPFLAGS_FOR_LIBGC=$CPPFLAGS
libmono_ldflags="-mms-bitfields -mwindows"
libdl=
libgc_threads=win32
- libgc_default=included
with_sigaltstack=no
with_tls=pthread
LN_S=cp
need_link_unlink=yes
AC_DEFINE(PTHREAD_POINTER_ID)
libdl=
- libgc_default=boehm
libgc_threads=pthreads
with_sigaltstack=no
use_sigposix=yes
libmono_cflags="-D_REENTRANT"
libdl=
libgc_threads=pthreads
- libgc_default=boehm
use_sigposix=yes
ikvm_native=no
AC_DEFINE(DISABLE_SOCKETS,1,[Disable sockets support])
dnl Boehm GC configuration
dnl
-AC_ARG_WITH(libgc, [ --with-gc=boehm,included,none Controls the Boehm GC config, default=included],[libgc=$with_gc],[libgc=$libgc_default])
+AC_ARG_WITH(libgc, [ --with-gc=included,none Controls the Boehm GC config, default=included],[libgc=$with_gc],[libgc=included])
AC_ARG_ENABLE(boehm, [ --disable-boehm Disable the Boehm GC.], support_boehm=$enableval,support_boehm=${support_boehm:-yes})
AM_CONDITIONAL(SUPPORT_BOEHM, test x$support_boehm = xyes)
libgc_configure_args="$libgc_configure_args --enable-parallel-mark"
fi
-gc_headers=no
gc_msg=""
-use_included_gc=no
LIBGC_CPPFLAGS=
LIBGC_LIBS=
LIBGC_STATIC_LIBS=
libgc_dir=
case "x$libgc" in
- xboehm|xbohem|xyes)
- AC_CHECK_HEADERS(gc.h gc/gc.h, gc_headers=yes)
- AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes",,$libdl)
-
- if test "x$found_boehm" != "xyes"; then
- AC_MSG_ERROR("GC requested but libgc not found! Install libgc or run configure with --with-gc=none.")
- fi
- if test "x$gc_headers" != "xyes"; then
- AC_MSG_ERROR("GC requested but header files not found! You may need to install them by hand.")
- fi
-
- LIBGC_LIBS="-lgc $libdl"
- LIBGC_STATIC_LIBS="$LIBGC_LIBS"
- libmono_ldflags="$libmono_ldflags -lgc"
- BOEHM_DEFINES="-DHAVE_BOEHM_GC"
-
- # AC_CHECK_FUNCS does not work for some reason...
- AC_CHECK_LIB(gc, GC_gcj_malloc, found_gcj_malloc="yes",,$libdl)
- if test "x$found_gcj_malloc" = "xyes"; then
- BOEHM_DEFINES="-DHAVE_GC_GCJ_MALLOC $BOEHM_DEFINES"
- AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "System Boehm (with typed GC)", [GC description])
- gc_msg="System Boehm with typed GC"
- else
- AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "System Boehm (no typed GC)", [GC description])
- gc_msg="System Boehm (without typed GC)"
- fi
- AC_CHECK_LIB(gc, GC_enable, found_gc_enable="yes",,$libdl)
- if test "x$found_gc_enable" = "xyes"; then
- BOEHM_DEFINES="-DHAVE_GC_ENABLE $BOEHM_DEFINES"
- fi
-
- # check whether we need to explicitly allow
- # thread registering
- AC_CHECK_LIB(gc, GC_allow_register_threads, found_allow_register_threads="yes",,$libdl)
- if test "x$found_allow_register_threads" = "xyes"; then
- AC_DEFINE(HAVE_GC_ALLOW_REGISTER_THREADS, 1, [GC requires thread registration])
- fi
- ;;
-
xincluded)
- use_included_gc=yes
if test "x$support_boehm" = "xyes"; then
libgc_dir=libgc
fi
LIBGC_LIBS='$(top_builddir)/libgc/libmonogc.la'
LIBGC_STATIC_LIBS='$(top_builddir)/libgc/libmonogc-static.la'
- BOEHM_DEFINES="-DHAVE_BOEHM_GC -DHAVE_GC_H -DUSE_INCLUDED_LIBGC -DHAVE_GC_GCJ_MALLOC -DHAVE_GC_ENABLE"
+ BOEHM_DEFINES="-DHAVE_BOEHM_GC"
if test x$target_win32 = xyes; then
BOEHM_DEFINES="$BOEHM_DEFINES -DGC_NOT_DLL"
fi
;;
+ xboehm|xbohem|xyes)
+ AC_MSG_WARN("External Boehm is no longer supported")
+ ;;
+
xsgen)
AC_MSG_WARN("Use --with-sgen instead, --with-gc= controls Boehm configuration")
;;
CPPFLAGS="$CPPFLAGS -DLARGE_CONFIG"
fi
-AM_CONDITIONAL(INCLUDED_LIBGC, test x$use_included_gc = xyes)
AC_SUBST(LIBGC_CPPFLAGS)
AC_SUBST(LIBGC_LIBS)
AC_SUBST(LIBGC_STATIC_LIBS)
AM_CONDITIONAL(HOST_ARM64, test x$HOST = xARM64)
AM_CONDITIONAL(CROSS_COMPILE, test "x$host" != "x$target")
-AM_CONDITIONAL(INCLUDED_LIBGC, test x$libgc = xincluded)
-
AC_SUBST(LIBC)
AC_SUBST(INTL)
AC_SUBST(SQLITE)
#if !defined(GC_USE_LD_WRAP) && \
(defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) || defined(GC_DARWIN_THREADS) || defined(GC_MACOSX_THREADS))
-#if defined(_IN_LIBGC) || defined(USE_INCLUDED_LIBGC)
# include "gc_pthread_redirects.h"
-#else
-# include <gc/gc_pthread_redirects.h>
-#endif
#endif
# if defined(PCR) || defined(GC_SOLARIS_THREADS) || \
#if HAVE_BOEHM_GC
-#ifdef USE_INCLUDED_LIBGC
#undef TRUE
#undef FALSE
#define THREAD_LOCAL_ALLOC 1
#include "private/pthread_support.h"
-#endif
#if defined(PLATFORM_MACOSX) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
void *pthread_get_stackaddr_np(pthread_t);
GC_finalize_on_demand = 1;
GC_finalizer_notifier = mono_gc_finalize_notify;
-#ifdef HAVE_GC_GCJ_MALLOC
GC_init_gcj_malloc (5, NULL);
-#endif
-
-#ifdef HAVE_GC_ALLOW_REGISTER_THREADS
- GC_allow_register_threads();
-#endif
if ((env = g_getenv ("MONO_GC_PARAMS"))) {
char **ptr, **opts = g_strsplit (env, ",", -1);
gboolean
mono_gc_is_gc_thread (void)
{
-#if GC_VERSION_MAJOR >= 7
- return TRUE;
-#elif defined(USE_INCLUDED_LIBGC)
return GC_thread_is_registered ();
-#else
- return TRUE;
-#endif
}
extern int GC_thread_register_foreign (void *base_addr);
static void*
boehm_thread_register (MonoThreadInfo* info, void *baseptr)
{
-#if GC_VERSION_MAJOR >= 7
- struct GC_stack_base sb;
- int res;
-
- res = GC_get_stack_base (&sb);
- if (res != GC_SUCCESS) {
- sb.mem_base = baseptr;
-#ifdef __ia64__
- /* Can't determine the register stack bounds */
- g_error ("mono_gc_register_thread failed ().\n");
-#endif
- }
- res = GC_register_my_thread (&sb);
- if ((res != GC_SUCCESS) && (res != GC_DUPLICATE)) {
- g_warning ("GC_register_my_thread () failed.\n");
- return NULL;
- }
- return info;
-#else
if (mono_gc_is_gc_thread())
return info;
-#if defined(USE_INCLUDED_LIBGC) && !defined(HOST_WIN32)
+#if !defined(HOST_WIN32)
return GC_thread_register_foreign (baseptr) ? info : NULL;
#else
return NULL;
#endif
-#endif
}
static void
gboolean
mono_object_is_alive (MonoObject* o)
{
-#ifdef USE_INCLUDED_LIBGC
return GC_is_marked ((gpointer)o);
-#else
- return TRUE;
-#endif
}
int
return 1;
}
-#ifdef USE_INCLUDED_LIBGC
-
static gint64 gc_start_time;
static void
GC_on_heap_resize = on_gc_heap_resize;
}
-#else
-
-void
-mono_gc_enable_events (void)
-{
-}
-
-#endif
-
int
mono_gc_register_root (char *start, size_t size, void *descr)
{
void*
mono_gc_make_descr_from_bitmap (gsize *bitmap, int numbits)
{
-#ifdef HAVE_GC_GCJ_MALLOC
/* It seems there are issues when the bitmap doesn't fit: play it safe */
if (numbits >= 30)
return GC_NO_DESCRIPTOR;
else
return (gpointer)GC_make_descriptor ((GC_bitmap)bitmap, numbits);
-#else
- return NULL;
-#endif
}
void*
int
mono_gc_get_suspend_signal (void)
{
-#ifdef USE_INCLUDED_GC
return GC_get_suspend_signal ();
-#else
- return -1;
-#endif
}
int
mono_gc_get_restart_signal (void)
{
-#ifdef USE_INCLUDED_GC
return GC_get_restart_signal ();
-#else
- return -1;
-#endif
}
-#if defined(USE_INCLUDED_LIBGC) && defined(USE_COMPILER_TLS) && defined(__linux__) && (defined(__i386__) || defined(__x86_64__))
+#if defined(USE_COMPILER_TLS) && defined(__linux__) && (defined(__i386__) || defined(__x86_64__))
extern __thread MONO_TLS_FAST void* GC_thread_tls;
#include "metadata-internals.h"
#ifdef HOST_WIN32
BOOL APIENTRY mono_gc_dllmain (HMODULE module_handle, DWORD reason, LPVOID reserved)
{
-#ifdef USE_INCLUDED_LIBGC
return GC_DllMain (module_handle, reason, reserved);
-#else
- return TRUE;
-#endif
}
#endif
void
mono_gc_register_altstack (gpointer stack, gint32 stack_size, gpointer altstack, gint32 altstack_size)
{
-#ifdef USE_INCLUDED_LIBGC
GC_register_altstack (stack, stack_size, altstack, altstack_size);
-#endif
}
int
#include <mono/utils/mono-memory-model.h>
#include "cominterop.h"
-#ifdef HAVE_BOEHM_GC
+#if defined(HAVE_BOEHM_GC)
#define NEED_TO_ZERO_PTRFREE 1
+#define GC_NO_DESCRIPTOR ((gpointer)(0 | GC_DS_LENGTH))
#define ALLOC_PTRFREE(obj,vt,size) do { (obj) = GC_MALLOC_ATOMIC ((size)); (obj)->vtable = (vt); (obj)->synchronisation = NULL;} while (0)
#define ALLOC_OBJECT(obj,vt,size) do { (obj) = GC_MALLOC ((size)); (obj)->vtable = (vt);} while (0)
-#ifdef HAVE_GC_GCJ_MALLOC
-#define GC_NO_DESCRIPTOR ((gpointer)(0 | GC_DS_LENGTH))
#define ALLOC_TYPED(dest,size,type) do { (dest) = GC_GCJ_MALLOC ((size),(type)); } while (0)
-#else
-#define GC_NO_DESCRIPTOR (NULL)
-#define ALLOC_TYPED(dest,size,type) do { (dest) = GC_MALLOC ((size)); *(gpointer*)dest = (type);} while (0)
-#endif
-#else
-#ifdef HAVE_SGEN_GC
+#elif defined(HAVE_SGEN_GC)
#define GC_NO_DESCRIPTOR (NULL)
#define ALLOC_PTRFREE(obj,vt,size) do { (obj) = mono_gc_alloc_obj (vt, size);} while (0)
#define ALLOC_OBJECT(obj,vt,size) do { (obj) = mono_gc_alloc_obj (vt, size);} while (0)
#define ALLOC_OBJECT(obj,vt,size) do { (obj) = calloc (1, (size)); (obj)->vtable = (vt);} while (0)
#define ALLOC_TYPED(dest,size,type) do { (dest) = calloc (1, (size)); *(gpointer*)dest = (type);} while (0)
#endif
-#endif
static MonoObject* mono_object_new_ptrfree (MonoVTable *vtable);
static MonoObject* mono_object_new_ptrfree_box (MonoVTable *vtable);
mono_register_jit_icall (mono_object_new_fast, "mono_object_new_fast", mono_create_icall_signature ("object ptr"), FALSE);
mono_register_jit_icall (mono_string_alloc, "mono_string_alloc", mono_create_icall_signature ("object int"), FALSE);
-#ifdef HAVE_GC_GCJ_MALLOC
- /*
- * This is not needed unless the relevant code in mono_get_allocation_ftn () is
- * turned on.
- */
-#if 0
-#ifdef GC_REDIRECT_TO_LOCAL
- mono_register_jit_icall (GC_local_gcj_malloc, "GC_local_gcj_malloc", mono_create_icall_signature ("object int ptr"), FALSE);
- mono_register_jit_icall (GC_local_gcj_fast_malloc, "GC_local_gcj_fast_malloc", mono_create_icall_signature ("object int ptr"), FALSE);
-#endif
- mono_register_jit_icall (GC_gcj_malloc, "GC_gcj_malloc", mono_create_icall_signature ("object int ptr"), FALSE);
- mono_register_jit_icall (GC_gcj_fast_malloc, "GC_gcj_fast_malloc", mono_create_icall_signature ("object int ptr"), FALSE);
-#endif
-
-#endif
gcj_inited = TRUE;
mono_loader_unlock ();
}
monodir=$(top_builddir)
# This is needed for automake dependency generation
-if INCLUDED_LIBGC
libgc_libs=$(monodir)/libgc/libmonogc.la
libgc_static_libs=$(monodir)/libgc/libmonogc-static.la
-else
-libgc_libs=$(LIBGC_LIBS)
-libgc_static_libs=$(LIBGC_STATIC_LIBS)
-endif
libs= \
$(monodir)/mono/metadata/libmonoruntime.la \
* it if it is the included one.
*/
-# if defined(HAVE_KW_THREAD) && defined(USE_INCLUDED_LIBGC) && !defined(__powerpc__)
+# if defined(HAVE_KW_THREAD) && !defined(__powerpc__)
/* The local alloc stuff is in pthread_support.c, but solaris uses solaris_threads.c */
/* It is also disabled on solaris/x86 by libgc/configure.ac */
/*
# endif
# endif
-# ifdef HAVE_GC_GC_H
-# include <gc/gc.h>
-# include <gc/gc_typed.h>
-# include <gc/gc_mark.h>
-# include <gc/gc_gcj.h>
-# elif defined(HAVE_GC_H) || defined(USE_INCLUDED_LIBGC)
-# include <gc.h>
-# include <gc_typed.h>
-# include <gc_mark.h>
-# include <gc_gcj.h>
-# else
-# error have boehm GC without headers, you probably need to install them by hand
-# endif
+# include <gc.h>
+# include <gc_typed.h>
+# include <gc_mark.h>
+# include <gc_gcj.h>
#if defined(HOST_WIN32)
#define CreateThread GC_CreateThread
<top_srcdir>$(MSBuildProjectDirectory)\..</top_srcdir>
<LIBGC_CPPFLAGS_INCLUDE>$(top_srcdir)\libgc\include</LIBGC_CPPFLAGS_INCLUDE>
<GLIB_CFLAGS_INCLUDE>$(top_srcdir)\eglib\src</GLIB_CFLAGS_INCLUDE>
- <BOEHM_DEFINES>HAVE_BOEHM_GC;HAVE_GC_H;USE_INCLUDED_LIBGC;HAVE_GC_GCJ_MALLOC;HAVE_GC_ENABLE</BOEHM_DEFINES>
+ <BOEHM_DEFINES>HAVE_BOEHM_GC</BOEHM_DEFINES>
<SGEN_DEFINES>HAVE_SGEN_GC;HAVE_MOVING_COLLECTOR;HAVE_WRITE_BARRIERS</SGEN_DEFINES>
</PropertyGroup>
<ItemDefinitionGroup>
/* Define to 1 if you have the `fstatvfs' function. */
/* #undef HAVE_FSTATVFS */
-/* Have GC_enable */
-/* #define HAVE_GC_ENABLE 1 */
-
-/* Have GC_gcj_malloc */
-/* #define HAVE_GC_GCJ_MALLOC 1 */
-
-/* Define to 1 if you have the <gc/gc.h> header file. */
-/* #undef HAVE_GC_GC_H */
-
-/* Have gc.h */
-/* #define HAVE_GC_H 1 */
-
/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1