From 4f1aba885b401294b5d0690f953949f825d43101 Mon Sep 17 00:00:00 2001 From: ivmai Date: Wed, 13 Apr 2011 19:49:10 +0000 Subject: [PATCH] 2011-04-13 Ivan Maidanski (mostly really Rainer Orth) * configure.ac (THREADDLLIBS): Use alternate thread library on Solaris 8. * configure.ac (need_atomic_ops_asm): Set to true only for Sparc Solaris. * configure.ac: Don't use libdl on mips-sgi-irix6. * configure: Regenerate. --- ChangeLog | 9 +++++++++ configure | 23 +++++++++++++++++------ configure.ac | 27 +++++++++++++++++++-------- 3 files changed, 45 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 318e6a3..f3b6fce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-04-13 Ivan Maidanski (mostly really Rainer Orth) + + * configure.ac (THREADDLLIBS): Use alternate thread library on + Solaris 8. + * configure.ac (need_atomic_ops_asm): Set to true only for Sparc + Solaris. + * configure.ac: Don't use libdl on mips-sgi-irix6. + * configure: Regenerate. + 2011-04-11 Ivan Maidanski (really Jie Liu) * mach_dep.c (NO_GETCONTEXT); Define for RTEMS. diff --git a/configure b/configure index a06db04..01b690b 100755 --- a/configure +++ b/configure @@ -5167,11 +5167,11 @@ $as_echo "$as_me: WARNING: \"Only on NetBSD 2.0 or later.\"" >&2;} $as_echo "#define THREAD_LOCAL_ALLOC 1" >>confdefs.h - THREADDLLIBS="-lpthread -lrt" - if test "$GCC" != yes; then - CFLAGS="$CFLAGS -O" - need_atomic_ops_asm=true - fi + # Need to use alternate thread library, otherwise gctest hangs + # on Solaris 8. + multi_os_directory=`$CC -print-multi-os-directory` + THREADDLLIBS="-L/usr/lib/lwp/$multi_os_directory \ + -R/usr/lib/lwp/$multi_os_directory -lpthread -lrt" ;; *-*-irix*) $as_echo "#define GC_IRIX_THREADS 1" >>confdefs.h @@ -5225,6 +5225,14 @@ $as_echo "$as_me: WARNING: \"Explicit GC_INIT() calls may be required.\"" >&2;}; as_fn_error $? "\"Pthreads not supported by the GC on this platform.\"" "$LINENO" 5 ;; esac + case "$host" in + sparc*-*-solaris*) + if test "$GCC" != yes; then + CFLAGS="$CFLAGS -O" + need_atomic_ops_asm=true + fi + ;; + esac ;; win32) $as_echo "#define GC_THREADS 1" >>confdefs.h @@ -5366,9 +5374,12 @@ $as_echo "#define DARWIN_DONT_PARSE_STACK 1" >>confdefs.h fi +case "$host" in +# While IRIX 6 has libdl for the O32 and N32 ABIs, it's missing for N64 +# and unnecessary everywhere. + mips-sgi-irix6*) ;; # We never want libdl on darwin. It is a fake libdl that just ends up making # dyld calls anyway. The same applies to Cygwin. -case "$host" in *-*-darwin*) ;; *-*-cygwin*) ;; *) diff --git a/configure.ac b/configure.ac index e4c62e7..0d9083e 100644 --- a/configure.ac +++ b/configure.ac @@ -22,8 +22,8 @@ AC_INIT(gc,7.2alpha5,Hans.Boehm@hp.com) AC_CONFIG_SRCDIR(gcj_mlc.c) AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_TARGET -AC_PREREQ(2.53) -AC_REVISION($Revision: 1.64 $) +AC_PREREQ(2.64) +AC_REVISION($Revision: 1.65 $) GC_SET_VERSION AM_INIT_AUTOMAKE([foreign dist-bzip2 nostdinc]) AM_CONFIG_HEADER([include/private/config.h]) @@ -180,11 +180,11 @@ case "$THREADS" in *-*-solaris*) AC_DEFINE(GC_SOLARIS_THREADS) AC_DEFINE(THREAD_LOCAL_ALLOC) - THREADDLLIBS="-lpthread -lrt" - if test "$GCC" != yes; then - CFLAGS="$CFLAGS -O" - need_atomic_ops_asm=true - fi + # Need to use alternate thread library, otherwise gctest hangs + # on Solaris 8. + multi_os_directory=`$CC -print-multi-os-directory` + THREADDLLIBS="-L/usr/lib/lwp/$multi_os_directory \ + -R/usr/lib/lwp/$multi_os_directory -lpthread -lrt" ;; *-*-irix*) AC_DEFINE(GC_IRIX_THREADS) @@ -226,6 +226,14 @@ case "$THREADS" in AC_MSG_ERROR("Pthreads not supported by the GC on this platform.") ;; esac + case "$host" in + sparc*-*-solaris*) + if test "$GCC" != yes; then + CFLAGS="$CFLAGS -O" + need_atomic_ops_asm=true + fi + ;; + esac ;; win32) AC_DEFINE(GC_THREADS) @@ -293,9 +301,12 @@ if test $compiler_xlc = yes -a "$powerpc_darwin" = true; then AC_DEFINE([DARWIN_DONT_PARSE_STACK], 1, [See doc/README.macros.]) fi +case "$host" in +# While IRIX 6 has libdl for the O32 and N32 ABIs, it's missing for N64 +# and unnecessary everywhere. + mips-sgi-irix6*) ;; # We never want libdl on darwin. It is a fake libdl that just ends up making # dyld calls anyway. The same applies to Cygwin. -case "$host" in *-*-darwin*) ;; *-*-cygwin*) ;; *) -- 2.7.4