From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10249 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Issues when building libcxx libcxxabi with MUSL Date: Thu, 30 Jun 2016 09:38:28 -0400 Message-ID: <20160630133827.GA15995@brightrain.aerifal.cx> References: <87e30e04-a81d-4302-5dd7-0846aa0f711b@codeaurora.org> <1165D9B8-DEDB-4393-B734-3FC1AFFAB46F@gmail.com> <20160622194149.GU10893@brightrain.aerifal.cx> <8836ED26-349A-4701-9D7A-F1D2CF272A24@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1467293936 10874 80.91.229.3 (30 Jun 2016 13:38:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jun 2016 13:38:56 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10262-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jun 30 15:38:49 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1bIcB2-00080D-Jo for gllmg-musl@m.gmane.org; Thu, 30 Jun 2016 15:38:44 +0200 Original-Received: (qmail 14216 invoked by uid 550); 30 Jun 2016 13:38:41 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 14198 invoked from network); 30 Jun 2016 13:38:41 -0000 Content-Disposition: inline In-Reply-To: <8836ED26-349A-4701-9D7A-F1D2CF272A24@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:10249 Archived-At: On Thu, Jun 30, 2016 at 02:50:14PM +0200, Julien Ramseier wrote: > > > Le 22 juin 2016 à 21:41, Rich Felker a écrit : > > > > On Wed, Jun 22, 2016 at 09:38:17PM +0200, Julien Ramseier wrote: > >> Hi Zhao, > >> > >> Not sure how you did build llvm-libcxx, but the only issue I encountered myself is > >> the use of PTHREAD_MUTEX_INITIALIZER in libcxx include/__mutex_base. > >> musl uses volatile types in its pthread_mutex_t struct and C++11 does not allow them > >> with constexpr member initializers. This rule has been relaxed in C++14. > > > > Note that the code using them is still formally/conceptually buggy. > > POSIX does not permit using these initializers as values. They can > > only be used as initializers for objects with static storage duration. > > A "mutex value" makes no sense; mutexes are objects not values. > > Actually the latest POSIX spec allows it. > See http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_init.html Could you cite the specific text you're looking at? The requirement of static storage was removed by http://austingroupbugs.net/view.php?id=70 but I see nothing allowing the use of mutex values or assigning one to another, which as I understand it is what the offending libc++ code is doing. > A workaround for the C++11 constexpr issue should land soon in libcxx trunk. > http://reviews.llvm.org/D21637 I'm not very good at reading modern C++, but that looks like an actual fix, not a workaround. Rich