summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac16
2 files changed, 21 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index c2c5402a..4d0174b6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -69,7 +69,7 @@ else
EXTRA_DIST += extra/gc.c
libgc_la_SOURCES = \
- allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
+ allchblk.c alloc.c blacklst.c dbg_mlc.c \
dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c \
mach_dep.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
obj_map.c os_dep.c ptr_chck.c reclaim.c specific.c stubborn.c typd_mlc.c
@@ -99,6 +99,10 @@ if MAKE_BACK_GRAPH
libgc_la_SOURCES += backgraph.c
endif
+if CHECKSUMS
+libgc_la_SOURCES += checksums.c
+endif
+
if ENABLE_DISCLAIM
libgc_la_SOURCES += fnlz_mlc.c
endif
diff --git a/configure.ac b/configure.ac
index 309fb702..603773d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -908,6 +908,22 @@ else
fi
fi
+AC_ARG_WITH([checksums],
+ [AS_HELP_STRING([--with-checksums],
+ [Report on erroneously cleared dirty bits and
+ unexpectedly altered stubborn objects, at
+ substantial performance cost; use only for debugging
+ of the incremental collector])])
+if test x$with_checksums = xyes; then
+ if test x$enable_munmap != x -o x$THREADS != xnone; then
+ AC_MSG_ERROR([CHECKSUMS not compatible with USE_MUNMAP or threads])
+ fi
+ AC_DEFINE([CHECKSUMS], 1,
+ [Erroneously cleared dirty bits checking. Use only for
+ debugging of the incremental collector.])
+fi
+AM_CONDITIONAL([CHECKSUMS], test x$with_checksums = xyes)
+
AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
AC_ARG_ENABLE(werror, [--enable-werror Pass -Werror to the C compiler],