From patchwork Mon Jan 31 14:01:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 81103 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 667CBB70E3 for ; Tue, 1 Feb 2011 01:01:26 +1100 (EST) Received: (qmail 10642 invoked by alias); 31 Jan 2011 14:01:24 -0000 Received: (qmail 10627 invoked by uid 22791); 31 Jan 2011 14:01:23 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, TW_GC, TW_JG, TW_LR, T_RP_MATCHES_RCVD 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; Mon, 31 Jan 2011 14:01:18 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 4B5A8659; Mon, 31 Jan 2011 15:01:16 +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 SEWrP7nmQlh4; Mon, 31 Jan 2011 15:01:14 +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 B4473658; Mon, 31 Jan 2011 15:01:14 +0100 (CET) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id p0VE1E6S013104; Mon, 31 Jan 2011 15:01:14 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: java-patches@gcc.gnu.org Subject: [build] Link libgcjgc with -lrt on Solaris > 8 Date: Mon, 31 Jan 2011 15:01:14 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Testing my boehm-gc testsuite patch [testsuite, build] Convert boehm-gc testsuite to DejaGnu (PR boehm-gc/11412) http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01638.html on Solaris < 11 revealed that my last cleanup PATCH: Only use /usr/lib/lwp in boehm-gc on Solaris 8 http://gcc.gnu.org/ml/gcc-patches/2010-03/msg00128.html has been over-eager in removing -lrt beyond Solaris 8: all tests failed because libgcjgc.so references sched_yield and sem_* functions, which only live in librt before Solaris 11. This patch fixes this and lets the boehm-gc DejaGnu testsuite pass on Solaris 8 to 11, SPARC and x86. Installed. Rainer 2011-01-08 Rainer Orth * configure.ac (*-*-solaris2*): Add -lrt to THREADLIBS. * configure: Regenerate. diff -r e5d3f67cc78f boehm-gc/configure.ac --- a/boehm-gc/configure.ac Sat Jan 08 01:34:09 2011 +0100 +++ b/boehm-gc/configure.ac Sat Jan 08 02:17:03 2011 +0100 @@ -193,7 +193,9 @@ # 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 + # nanosleep, sched_yield, and sem_* only live in librt before + # Solaris 11. + THREADLIBS="-lpthread -lrt" ;; *-*-irix*) AC_DEFINE(GC_IRIX_THREADS,1,[support for Irix pthreads])