From patchwork Fri Feb 17 13:42:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 141820 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 80ABEB6F9D for ; Sat, 18 Feb 2012 00:43:01 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1330090982; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Cc:Subject:References:Date:In-Reply-To: Message-ID:User-Agent:MIME-Version:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=w0dDkMDS83hs+fkSOEtDyG4H318=; b=sbd+/Hrt8K0sEQykSpFoaueb0Eb5s18oY60Sbf5BtP6GQJ/j2BbEBQ5BIP/uKK +j022osL0eq7nIBm0VJ3hH2n/9n/2XJrW/nAoVq7wgn+pi49JaUTpTRRIY3Ovuf2 WE9FQwlXxZBscXYWcsrvxOcDID8Cz9QZXkCsF3JjWpjIE= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID:User-Agent:MIME-Version:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=km2B9XEzBRNWMWNymPVyGrP11wKbZcj6Uz01RReEi+Fye0A3ynCzIYAX4rDbXA 8pc3RtSvTb1R0rSHpJMCmrRViBPbvfDGtgzwz1SXnhjTXiz+iVVelCAobADwg5bV 3HcWdZc5XFk+xpVip7MTzFFjCBGW0EuXPZ/DMoyNayMrQ=; Received: (qmail 882 invoked by alias); 17 Feb 2012 13:42:50 -0000 Received: (qmail 861 invoked by uid 22791); 17 Feb 2012 13:42:47 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, TW_CX, TW_DC, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS 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; Fri, 17 Feb 2012 13:42:27 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 49F1F430; Fri, 17 Feb 2012 14:42:26 +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 XKnHqomlCwhP; Fri, 17 Feb 2012 14:42:23 +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 2C39942E; Fri, 17 Feb 2012 14:42:23 +0100 (CET) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id q1HDgMCV011702; Fri, 17 Feb 2012 14:42:22 +0100 (MET) From: Rainer Orth To: Jonathan Wakely Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org, Paolo Bonzini Subject: Re: [v3] Disable gthreads on Solaris 8/9 (PR libstdc++/52189) References: Date: Fri, 17 Feb 2012 14:42:22 +0100 In-Reply-To: (Jonathan Wakely's message of "Fri, 17 Feb 2012 00:35:54 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (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 Jonathan Wakely writes: > For the HTML docs, just check in without that bit in the ChangeLog. > Regenerating the HTML changes almost every page because links between > sections get randomly-generated anchor names, so I'll just do an > update for doc/html/* once your change is checked in. Ok, I see. I've checked in the following after re-testing as follows: * i386-pc-solaris2.10 bootstrap, gthreads remains enabled, abi_check results clean with regenerated baselines * i386-pc-solaris2.9 C++-only bootstrap with --enable-libstdcxx-threads, gthreads enabled with expected warning, abi_check results show additional symbols with versioning breakage * i386-pc-solaris2.8 C++-only bootstrap, gthreads disabled as expected, abi_check results clean with regenerated baselines. Thanks. Rainer 2012-02-12 Rainer Orth PR libstdc++/52189 * acinclude.m4 (GLIBCXX_CHECK_GTHREADS): Handle --enable-libstdcxx-threads. Disable on Solaris 8/9 with symbol versioning. * configure.ac (GLIBCXX_CHECK_GTHREADS): Move after GLIBCXX_ENABLE_SYMVERS. * configure: Regenerate. * doc/xml/manual/configure.xml (--enable-libstdcxx-threads): Explain. # HG changeset patch # Parent f44555017ca294fa283c4c114208438a87f249c7 Disable gthreads on Solaris 8/9 (PR libstdc++/52189) diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -3325,7 +3325,14 @@ dnl Check if gthread implementation defi dnl required by the c++0x thread library. Conforming gthread dnl implementations can define __GTHREADS_CXX0X to enable use with c++0x. dnl +dnl GLIBCXX_ENABLE_SYMVERS must be done before this. +dnl AC_DEFUN([GLIBCXX_CHECK_GTHREADS], [ + GLIBCXX_ENABLE(libstdcxx-threads,auto,,[enable C++11 threads support]) + + if test x$enable_libstdcxx_threads = xauto || + test x$enable_libstdcxx_threads = xyes; then + AC_LANG_SAVE AC_LANG_CPLUSPLUS @@ -3364,7 +3371,28 @@ AC_DEFUN([GLIBCXX_CHECK_GTHREADS], [ #ifndef __GTHREADS_CXX0X #error #endif - ], [ac_has_gthreads=yes], [ac_has_gthreads=no]) + ], [case $target_os in + # gthreads support breaks symbol versioning on Solaris 8/9 (PR + # libstdc++/52189). + solaris2.[[89]]*) + if test x$enable_symvers = xno; then + ac_has_gthreads=yes + elif test x$enable_libstdcxx_threads = xyes; then + AC_MSG_WARN([You have requested C++11 threads support, but]) + AC_MSG_WARN([this breaks symbol versioning.]) + ac_has_gthreads=yes + else + ac_has_gthreads=no + fi + ;; + *) + ac_has_gthreads=yes + ;; + esac], + [ac_has_gthreads=no]) + else + ac_has_gthreads=no + fi AC_MSG_RESULT([$ac_has_gthreads]) diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -164,9 +164,6 @@ GLIBCXX_CHECK_GETTIMEOFDAY # NB: The default is [no], because otherwise it requires linking. GLIBCXX_ENABLE_LIBSTDCXX_TIME([no]) -# For gthread support -GLIBCXX_CHECK_GTHREADS - AC_LC_MESSAGES # For hardware_concurrency @@ -335,6 +332,9 @@ GLIBCXX_CONDITIONAL(GLIBCXX_LDBL_COMPAT, # This depends on GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE. GLIBCXX_CONFIGURE_TESTSUITE +# For gthread support. Depends on GLIBCXX_ENABLE_SYMVERS. +GLIBCXX_CHECK_GTHREADS + # Define documentation rules conditionally. # See if makeinfo has been installed and is modern enough diff --git a/libstdc++-v3/doc/xml/manual/configure.xml b/libstdc++-v3/doc/xml/manual/configure.xml --- a/libstdc++-v3/doc/xml/manual/configure.xml +++ b/libstdc++-v3/doc/xml/manual/configure.xml @@ -161,6 +161,13 @@ + --enable-libstdcxx-threads + Enable C++11 threads support. If not explicitly specified, + the configure process enables it if possible. It defaults to 'off' + on Solaris 8 and 9, where it would break symbol versioning. This + option can change the library ABI. + + --enable-libstdcxx-time This is an abbreviated form of