From 228e9b246b64464a51e08a9ad1295018ddd0aff9 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 20 Apr 2018 01:15:53 +0300 Subject: [PATCH] Workaround gctest hang on kFreeBSD if thread-local allocations are on Issue #185 (bdwgc). * configure.ac [enable_gcj_support && enable_thread_local_alloc] (GC_ENABLE_SUSPEND_THREAD): Do not AC_DEFINE if host is kfreebsd; add FIXME item. --- configure.ac | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 35d5a45a..5dc812d6 100644 --- a/configure.ac +++ b/configure.ac @@ -684,8 +684,19 @@ AC_ARG_ENABLE(gcj-support, [Disable support for gcj.])]) if test x"$enable_gcj_support" != xno; then AC_DEFINE(GC_GCJ_SUPPORT, 1, [Define to include support for gcj.]) - AC_DEFINE([GC_ENABLE_SUSPEND_THREAD], 1, + case "$host" in + *-*-kfreebsd*-gnu) + # FIXME: For a reason, gctest hangs up on kFreeBSD if both of + # THREAD_LOCAL_ALLOC and GC_ENABLE_SUSPEND_THREAD are defined. + if test "${enable_thread_local_alloc}" = no; then + AC_DEFINE(GC_ENABLE_SUSPEND_THREAD) + fi + ;; + *) + AC_DEFINE([GC_ENABLE_SUSPEND_THREAD], 1, [Define to turn on GC_suspend_thread support.]) + ;; + esac fi dnl Interaction with other programs that might use signals. -- 2.40.0