From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10248 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Issues when building libcxx libcxxabi with MUSL Date: Thu, 30 Jun 2016 15:15:47 +0200 Message-ID: <20160630131546.GC19691@port70.net> 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=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1467292575 20552 80.91.229.3 (30 Jun 2016 13:16:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jun 2016 13:16:15 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10261-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jun 30 15:16:03 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 1bIbp3-0000nj-UM for gllmg-musl@m.gmane.org; Thu, 30 Jun 2016 15:16:02 +0200 Original-Received: (qmail 1874 invoked by uid 550); 30 Jun 2016 13:15:59 -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 1856 invoked from network); 30 Jun 2016 13:15:59 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <8836ED26-349A-4701-9D7A-F1D2CF272A24@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Xref: news.gmane.org gmane.linux.lib.musl.general:10248 Archived-At: * Julien Ramseier [2016-06-30 14:50:14 +0200]: > > Le 22 juin 2016 =E0 21:41, Rich Felker a =E9crit : > >=20 > > On Wed, Jun 22, 2016 at 09:38:17PM +0200, Julien Ramseier wrote: > >> Hi Zhao, > >>=20 > >> Not sure how you did build llvm-libcxx, but the only issue I encounter= ed 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++1= 4. > >=20 > > 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. >=20 > Actually the latest POSIX spec allows it. > See http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mut= ex_init.html >=20 yes, the changelog says POSIX.1-2008, Technical Corrigendum 1, XSH/TC1-2008/0460 [70,428] is applie= d. so the semantics changed in 2013 http://austingroupbugs.net/view.php?id=3D70 > A workaround for the C++11 constexpr issue should land soon in libcxx tru= nk. > http://reviews.llvm.org/D21637 >=20 note that without pthread_mutex_destroy it may leak resources. (in practice this e.g. matters on freebsd see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D71684 on musl this is not an issue)