From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29408 invoked by alias); 2 Mar 2010 20:38:45 -0000 Received: (qmail 29391 invoked by uid 22791); 2 Mar 2010 20:38:44 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Mar 2010 20:38:40 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id F2AEA46E; Tue, 2 Mar 2010 21:38:37 +0100 (CET) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OjTBPlgU3r-Z; Tue, 2 Mar 2010 21:38:35 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 4139746D; Tue, 2 Mar 2010 21:38:35 +0100 (CET) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.3+Sun/8.14.3/Submit) id o22KcYRI026788; Tue, 2 Mar 2010 21:38:34 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: java-patches@gcc.gnu.org, Hans Boehm Subject: PATCH: Only use /usr/lib/lwp in boehm-gc on Solaris 8 Date: Tue, 02 Mar 2010 20:38:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2010-q1/txt/msg00054.txt.bz2 I've recently had to look at boehm-gc (gctest crashes with a SEGV and all libgcj tests hang when boehm-gc was built with CVS GNU as and ld), and noticed the following snippet, which, though harmless, is superfluous on anything but Solaris 8: *-*-solaris*) AC_DEFINE(GC_SOLARIS_PTHREADS,1,[support for Solaris pthreads]) # Need to use alternate thread library, otherwise gctest hangs # on Solaris 8. multi_os_directory=`$CC -print-multi-os-directory` THREADLIBS="-L/usr/lib/lwp/$multi_os_directory \ -R/usr/lib/lwp/$multi_os_directory -lpthread -lthread -lrt" ;; This alternate thread library was introduced in Solaris 8, but became the default in Solaris 9 and up, so on those versions the change is pointless. /usr/lib/lwp contains just a libthread.so.1 -> ../libthread.so.1 symlink there, and is thus has no effect at compile time, and the -L/-R combo isn't needed as well. Ok for mainline? Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2010-02-28 Rainer Orth boehm-gc: * configure.ac (*-*-solaris2.8*): Only usr alternate thread library on Solaris 8. (*-*-solaris2*): Use regular thread library otherwise. * configure: Regenerate. diff -r 6eb2373e8848 boehm-gc/configure.ac --- a/boehm-gc/configure.ac Sun Feb 28 02:38:25 2010 +0100 +++ b/boehm-gc/configure.ac Sun Feb 28 08:15:45 2010 +0100 @@ -1,4 +1,5 @@ -# Copyright (c) 1999, 2000, 2001, 2002, 2003, 2006 by Red Hat, Inc. All rights reserved. +# Copyright (c) 1999, 2000, 2001, 2002, 2003, 2006, 2010 by Red Hat, Inc. +# All rights reserved. # Copyright 2004 Nathanael Nerode # # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED @@ -179,7 +180,7 @@ AM_CPPFLAGS="$AM_CPPFLAGS -pthread" THREADLIBS=-pthread ;; - *-*-solaris*) + *-*-solaris2.8*) AC_DEFINE(GC_SOLARIS_PTHREADS,1,[support for Solaris pthreads]) # Need to use alternate thread library, otherwise gctest hangs # on Solaris 8. @@ -187,6 +188,13 @@ THREADLIBS="-L/usr/lib/lwp/$multi_os_directory \ -R/usr/lib/lwp/$multi_os_directory -lpthread -lthread -lrt" ;; + *-*-solaris2*) + AC_DEFINE(GC_SOLARIS_PTHREADS,1,[support for Solaris pthreads]) + # The alternate thread library was only introduced in Solaris 8 and + # became the default in Solaris 9, so no need for the special code + # above otherwise. + THREADLIBS=-lpthread + ;; *-*-irix*) AC_DEFINE(GC_IRIX_THREADS,1,[support for Irix pthreads]) ;;