Message ID | 532C872D.8030107@linux.vnet.ibm.com |
---|---|
State | Rejected |
Headers |
Return-Path: <x14307373@homiemail-mx21.g.dreamhost.com> X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (caibbdcaaahb.dreamhost.com [208.113.200.71]) by wilcox.dreamhost.com (Postfix) with ESMTP id 8C5EA360103 for <siddhesh@wilcox.dreamhost.com>; Fri, 21 Mar 2014 11:38:51 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14307373) id 4F10F1B3CB10; Fri, 21 Mar 2014 11:38:51 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx21.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id 95FD21AFAB11 for <glibc@patchwork.siddhesh.in>; Fri, 21 Mar 2014 11:38:50 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; q=dns; s=default; b=rOr OGCC2Ud5gtYNBxn0ri1VllCOiTiZ/WFo1+P69CQipOe5bFOXy3c7QtjaRW2hwTP+ y4cDn09Z6K02Ji34dyxuDGjvz7LNbhJbvXp8UVePtpe+RNR7qlvuxBRrwucdFiFE IOlFl/ly8ld9w2HJTRc95gLHDBtg3IDwpd7FoQeA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; s=default; bh=A6jQRbRBu /lchzqIc+nJc2cbztA=; b=jZKJma3UW4OuZAUkicOU73zJOwUOO/88rqvvfdhSf oPdJPrzgKx4wTLmN65BfkCbXMb+9X6bJNZrKyZGkkJkxmWd80Ms35KFXnYSH22nb qK6hrdlMXBNrBiiOmlawLKm0hllFYiccVBUzURAwIYOSCPLK1hmzF/HiUidcp0XP es= Received: (qmail 9467 invoked by alias); 21 Mar 2014 18:38:47 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-glibc=patchwork.siddhesh.in@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 9457 invoked by uid 89); 21 Mar 2014 18:38:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e24smtp02.br.ibm.com Message-ID: <532C872D.8030107@linux.vnet.ibm.com> Date: Fri, 21 Mar 2014 15:38:37 -0300 From: Adhemerval Zanella <azanella@linux.vnet.ibm.com> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: "GNU C. Library" <libc-alpha@sourceware.org> Subject: [PATCH] PowerPC: Define __PTHREAD_MUTEX_HAVE_ELISION to 0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14032118-2194-0000-0000-000008585567 X-DH-Original-To: glibc@patchwork.siddhesh.in |
Commit Message
Adhemerval Zanella Netto
March 21, 2014, 6:38 p.m. UTC
This patch cleanups the compiler warnings on powerpc* builds. -- * nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h (__PTHREAD_MUTEX_HAVE_ELISION): Define it to 0. ---
Comments
On 21-03-2014 15:38, Adhemerval Zanella wrote: > This patch cleanups the compiler warnings on powerpc* builds. > > -- > > * nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h > (__PTHREAD_MUTEX_HAVE_ELISION): Define it to 0. > > --- > > diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h > index 71bd3ae..ac7351f 100644 > --- a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h > +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h > @@ -21,6 +21,8 @@ > > #include <bits/wordsize.h> > > +#define __PTHREAD_MUTEX_HAVE_ELISION 0 > + > #if __WORDSIZE == 64 > # define __SIZEOF_PTHREAD_ATTR_T 56 > # define __SIZEOF_PTHREAD_MUTEX_T 40 > Pushed upstream as 449282f2e0e850c29f6a9666058503d4734964f0
Adhemerval Zanella <azanella@linux.vnet.ibm.com> writes: > On 21-03-2014 15:38, Adhemerval Zanella wrote: >> This patch cleanups the compiler warnings on powerpc* builds. >> >> -- >> >> * nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h >> (__PTHREAD_MUTEX_HAVE_ELISION): Define it to 0. >> >> --- >> >> diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h >> index 71bd3ae..ac7351f 100644 >> --- a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h >> +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h >> @@ -21,6 +21,8 @@ >> >> #include <bits/wordsize.h> >> >> +#define __PTHREAD_MUTEX_HAVE_ELISION 0 >> + >> #if __WORDSIZE == 64 >> # define __SIZEOF_PTHREAD_ATTR_T 56 >> # define __SIZEOF_PTHREAD_MUTEX_T 40 >> > Pushed upstream as 449282f2e0e850c29f6a9666058503d4734964f0 That should be made archtecture independent, since it is an x86/s390-only macro. It doesn't make sence to force everyone to define it. Andreas.
On 25-03-2014 12:37, Andreas Schwab wrote: > Adhemerval Zanella <azanella@linux.vnet.ibm.com> writes: > >> On 21-03-2014 15:38, Adhemerval Zanella wrote: >>> This patch cleanups the compiler warnings on powerpc* builds. >>> >>> -- >>> >>> * nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h >>> (__PTHREAD_MUTEX_HAVE_ELISION): Define it to 0. >>> >>> --- >>> >>> diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h >>> index 71bd3ae..ac7351f 100644 >>> --- a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h >>> +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h >>> @@ -21,6 +21,8 @@ >>> >>> #include <bits/wordsize.h> >>> >>> +#define __PTHREAD_MUTEX_HAVE_ELISION 0 >>> + >>> #if __WORDSIZE == 64 >>> # define __SIZEOF_PTHREAD_ATTR_T 56 >>> # define __SIZEOF_PTHREAD_MUTEX_T 40 >>> >> Pushed upstream as 449282f2e0e850c29f6a9666058503d4734964f0 > That should be made archtecture independent, since it is an > x86/s390-only macro. It doesn't make sence to force everyone to define > it. > > Andreas. > I agree with you, but the patch to check if it is defined in nptl/sysdeps/pthread/pthread.h was rejected: https://sourceware.org/ml/libc-alpha/2014-03/msg00494.html. So I just folowed the way x86_64 and s390 does. If this was just an warning I'd rework it to make it more general, as Roland as suggested in https://sourceware.org/ml/libc-alpha/2014-03/msg00501.html; but it is breaking 'make check' build. So my preference now is let it as and focus on a proper fix, if any, after.
On Tue, 25 Mar 2014, Adhemerval Zanella wrote: > I agree with you, but the patch to check if it is defined in > nptl/sysdeps/pthread/pthread.h was rejected: > https://sourceware.org/ml/libc-alpha/2014-03/msg00494.html. So I just > folowed the way x86_64 and s390 does. If this was just an warning I'd > rework it to make it more general, as Roland as suggested in > https://sourceware.org/ml/libc-alpha/2014-03/msg00501.html; but it is > breaking 'make check' build. So my preference now is let it as and focus > on a proper fix, if any, after. I suggest an installed header bits/pthread-elision.h that defines __PTHREAD_MUTEX_HAVE_ELISION to an appropriate value. That avoids every architecture without elision needing to define this value in separate bits/pthreadtypes.h files. I also strongly advise *not* applying any architecture-specific fixes for -Wundef warnings that appear not to be architecture-specific without: (a) working out the correct general solution; (b) if not fixing all architectures, listing the issue and unfixed architectures on <https://sourceware.org/glibc/wiki/PortStatus>. We've made a lot of progress on avoiding architectures diverging from each other. Instead of ad hoc fixes for particular architectures, follow Siddhesh's example for fixing bits/mathdef.h (where he fixed all affected versions of the header). By all means just fix issues where the issue and fix appear genuinely architecture-specific, rather than relating to a header for which many architectures have their own versions all of which would need fixing similarly. But for architecture-independent issues like this, it's necessary to take the extra steps to avoid divergence and ensure agreement over the right fix for all architectures.
On 25-03-2014 13:19, Joseph S. Myers wrote: > On Tue, 25 Mar 2014, Adhemerval Zanella wrote: > >> I agree with you, but the patch to check if it is defined in >> nptl/sysdeps/pthread/pthread.h was rejected: >> https://sourceware.org/ml/libc-alpha/2014-03/msg00494.html. So I just >> folowed the way x86_64 and s390 does. If this was just an warning I'd >> rework it to make it more general, as Roland as suggested in >> https://sourceware.org/ml/libc-alpha/2014-03/msg00501.html; but it is >> breaking 'make check' build. So my preference now is let it as and focus >> on a proper fix, if any, after. > I suggest an installed header bits/pthread-elision.h that defines > __PTHREAD_MUTEX_HAVE_ELISION to an appropriate value. That avoids every > architecture without elision needing to define this value in separate > bits/pthreadtypes.h files. > > I also strongly advise *not* applying any architecture-specific fixes for > -Wundef warnings that appear not to be architecture-specific without: > > (a) working out the correct general solution; > > (b) if not fixing all architectures, listing the issue and unfixed > architectures on <https://sourceware.org/glibc/wiki/PortStatus>. > > We've made a lot of progress on avoiding architectures diverging from each > other. Instead of ad hoc fixes for particular architectures, follow > Siddhesh's example for fixing bits/mathdef.h (where he fixed all affected > versions of the header). > > By all means just fix issues where the issue and fix appear genuinely > architecture-specific, rather than relating to a header for which many > architectures have their own versions all of which would need fixing > similarly. But for architecture-independent issues like this, it's > necessary to take the extra steps to avoid divergence and ensure agreement > over the right fix for all architectures. > Fair enough, patch reverted.
diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h index 71bd3ae..ac7351f 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h @@ -21,6 +21,8 @@ #include <bits/wordsize.h> +#define __PTHREAD_MUTEX_HAVE_ELISION 0 + #if __WORDSIZE == 64 # define __SIZEOF_PTHREAD_ATTR_T 56 # define __SIZEOF_PTHREAD_MUTEX_T 40