From patchwork Wed Dec 14 18:50:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 131456 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 5114C1007D6 for ; Thu, 15 Dec 2011 05:51:17 +1100 (EST) Received: (qmail 22746 invoked by alias); 14 Dec 2011 18:51:15 -0000 Received: (qmail 22738 invoked by uid 22791); 14 Dec 2011 18:51:15 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM X-Spam-Check-By: sourceware.org Received: from mail-qw0-f54.google.com (HELO mail-qw0-f54.google.com) (209.85.216.54) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Dec 2011 18:50:57 +0000 Received: by qabg14 with SMTP id g14so768489qab.20 for ; Wed, 14 Dec 2011 10:50:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.59.209 with SMTP id m17mr505299qah.31.1323888656810; Wed, 14 Dec 2011 10:50:56 -0800 (PST) Received: by 10.229.89.134 with HTTP; Wed, 14 Dec 2011 10:50:56 -0800 (PST) In-Reply-To: References: <20111214170931.GB6579@intel.com> Date: Wed, 14 Dec 2011 10:50:56 -0800 Message-ID: Subject: Re: PATCH: Check __GLIBC__ when using __SIGRTMIN in generic-morestack.c From: "H.J. Lu" To: Ian Lance Taylor Cc: gcc-patches@gcc.gnu.org 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 On Wed, Dec 14, 2011 at 10:38 AM, Ian Lance Taylor wrote: > "H.J. Lu" writes: > >> Since __SIGRTMIN is for the NPTL threading library, should we check >> __GLIBC__ instead of __linux__?  Otherwise, it fails to build with >> Bionic library on Android. > > This is OK.  But please just fix the existing comment to say glibc > instead of Linux, or something like that.  No need for the new FIXME > comment as far as I can see. > This is what I checked in. Also OK for gcc-4_6-branch after a day or 2? Thanks. Index: generic-morestack.c =================================================================== --- generic-morestack.c (revision 182341) +++ generic-morestack.c (working copy) @@ -507,8 +507,8 @@ __generic_morestack_set_initial_sp (void sigemptyset (&__morestack_initial_sp.mask); sigfillset (&__morestack_fullmask); -#ifdef __linux__ - /* On Linux, the first two real time signals are used by the NPTL +#ifdef __GLIBC__ + /* In glibc, the first two real time signals are used by the NPTL threading library. By taking them out of the set of signals, we avoiding copying the signal mask in pthread_sigmask. More importantly, pthread_sigmask uses less stack space on x86_64. */ Index: ChangeLog =================================================================== --- ChangeLog (revision 182341) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2011-12-14 H.J. Lu + + * generic-morestack.c (__generic_morestack_set_initial_sp): Check + __GLIBC__ instead of __linux__ when using __SIGRTMIN. + 2011-12-14 Georg-Johann Lay PR target/49313