summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorivmai <ivmai>2009-10-20 23:27:25 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:51 +0200
commitc4e4721f491632c2039cece14400f353794273f4 (patch)
tree81ea0ea761bfcdc92d55a67d28fc0f83659cf9dd /configure.ac
parentf2127b50f72ad5449c24f1e0bd4b3d4ca88185d8 (diff)
2009-10-20 Ivan Maidanski <ivmai@mail.ru> (really mostly OpenBSD contributors)
* configure.ac (openbsd): Define GC_OPENBSD_THREADS. * configure.ac: Add AM_CONDITIONAL(OPENBSD_THREADS). * configure.ac: Add sparc-openbsd case. * doc/README.macros (GC_NETBSD_THREADS, GC_OPENBSD_THREADS): Document. * tests/test.c (main): Handle OpenBSD case. * extra/threadlibs.c: Add the copyright header; expand all tabs to spaces; remove trailing spaces at EOLn. * include/private/pthread_stop_world.h: Ditto. * extra/threadlibs.c (main): Replace K&R-style function definition with the ANSI C one. * extra/threadlibs.c (main): Handle GC_OPENBSD_THREADS case. * dyn_load.c (OPENBSD): Recognize (similar to NETBSD). * include/gc_config_macros.h (GC_SOLARIS_THREADS): Recognize; define it for OpenBSD. * include/gc_pthread_redirects.h (GC_pthread_sigmask, pthread_sigmask): Don't declare and redefine for OpenBSD. * include/private/gcconfig.h: Handle OpenBSD (on arm, sh, i386, amd64, powerpc). * mach_dep.c (NO_GETCONTEXT): Ditto. * include/private/pthread_stop_world.h (thread_stop_info): Don't define last_stop_count field if OpenBSD. * misc.c (GC_init_dyld): Add declaration (if NetBSD). * misc.c (GC_init): Don't call GC_init_netbsd_elf() for OpenBSD. * os_dep.c (GC_init_netbsd_elf): Don't define for OpenBSD. * os_dep.c (old_segv_act, GC_jmp_buf_openbsd): New static variable (only if OpenBSD). * os_dep.c (GC_fault_handler_openbsd, GC_find_limit_openbsd, GC_skip_hole_openbsd): New static function (only if OpenBSD). * os_dep.c (GC_get_stack_base, GC_get_main_stack_base, GC_register_data_segments): Define specially for OpenBSD case. * os_dep.c (GC_fault_handler_lock): Initialize to AO_TS_INITIALIZER (instead of 0). * pthread_support.c (GC_allocate_lock): Ditto. * pthread_stop_world.c (NSIG, GC_print_sig_mask, GC_remove_allowed_signals, suspend_handler_mask, GC_stop_count, GC_world_is_stopped, GC_retry_signals, SIG_THR_RESTART, GC_suspend_ack_sem, GC_suspend_handler_inner, GC_suspend_handler, GC_restart_handler): Don't define and use if OpenBSD. * pthread_stop_world.c (GC_suspend_all, GC_stop_world, GC_start_world): Handle OpenBSD case. * pthread_stop_world.c (GC_stop_init): Define as empty if OpenBSD. * pthread_support.c (pthread_sigmask): Don't undefine the macro and don't define the wrapper function if OpenBSD. * pthread_support.c (GC_thr_init): Handle OpenBSD case. * configure: Regenerate. * include/private/config.h.in: Ditto.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 12 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index a816355..0f484bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ AC_CONFIG_SRCDIR(gcj_mlc.c)
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_TARGET
AC_PREREQ(2.53)
-AC_REVISION($Revision: 1.55 $)
+AC_REVISION($Revision: 1.56 $)
GC_SET_VERSION
AM_INIT_AUTOMAKE([foreign dist-bzip2 nostdinc])
AM_CONFIG_HEADER([include/private/config.h])
@@ -87,6 +87,7 @@ AH_TEMPLATE([GC_HPUX_THREADS], [Define to support HP/UX 11 pthreads.])
AH_TEMPLATE([GC_IRIX_THREADS], [Define to support Irix pthreads.])
AH_TEMPLATE([GC_LINUX_THREADS], [Define to support pthreads on Linux.])
AH_TEMPLATE([GC_NETBSD_THREADS], [Define to support NetBSD pthreads.])
+AH_TEMPLATE([GC_OPENBSD_THREADS], [Define to support OpenBSD pthreads.])
AH_TEMPLATE([GC_OSF1_THREADS], [Define to support Tru64 pthreads.])
AH_TEMPLATE([GC_SOLARIS_THREADS], [Define to support Solaris pthreads.])
AH_TEMPLATE([GC_WIN32_THREADS], [Define to support win32 threads.])
@@ -139,16 +140,17 @@ case "$THREADS" in
*-*-hpux10*)
AC_MSG_WARN("Only HP-UX 11 POSIX threads are supported.")
;;
+ *-*-openbsd*)
+ AC_DEFINE(GC_OPENBSD_THREADS)
+ THREADDLLIBS=-pthread
+ INCLUDES="$INCLUDES -pthread"
+ openbsd_threads=true
+ ;;
*-*-freebsd*)
AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
AC_DEFINE(GC_FREEBSD_THREADS)
INCLUDES="$INCLUDES -pthread"
;;
- *-*-openbsd*)
- AC_MSG_WARN([OpenBSD does not yet fully support threads with Boehm GC.])
- AC_DEFINE([GC_FREEBSD_THREADS])
- INCLUDES="$INCLUDES -pthread"
- ;;
*-*-kfreebsd*-gnu)
AC_DEFINE(GC_FREEBSD_THREADS)
INCLUDES="$INCLUDES -pthread"
@@ -267,6 +269,7 @@ AM_CONDITIONAL(THREADS, test x$THREADS != xnone)
AM_CONDITIONAL(PTHREADS, test x$THREADS = xposix)
AM_CONDITIONAL(DARWIN_THREADS, test x$darwin_threads = xtrue)
AM_CONDITIONAL(WIN32_THREADS, test x$win32_threads = xtrue)
+AM_CONDITIONAL(OPENBSD_THREADS, test x$openbsd_threads = xtrue)
case "$host" in
powerpc-*-darwin*)
@@ -455,6 +458,9 @@ case "$host" in
sparc64-*-netbsd*)
machdep="mach_dep.lo sparc_mach_dep.lo"
;;
+ sparc*-*-openbsd*)
+ machdep="mach_dep.lo sparc_mach_dep.lo"
+ ;;
sparc-sun-solaris2.3)
machdep="mach_dep.lo sparc_mach_dep.lo"
AC_DEFINE(SUNOS53_SHARED_LIB, 1,