From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10247 Path: news.gmane.org!not-for-mail From: Julien Ramseier Newsgroups: gmane.linux.lib.musl.general Subject: Re: Issues when building libcxx libcxxabi with MUSL Date: Thu, 30 Jun 2016 14:50:14 +0200 Message-ID: <8836ED26-349A-4701-9D7A-F1D2CF272A24@gmail.com> References: <87e30e04-a81d-4302-5dd7-0846aa0f711b@codeaurora.org> <1165D9B8-DEDB-4393-B734-3FC1AFFAB46F@gmail.com> <20160622194149.GU10893@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_845CB4F0-1B28-47DF-BCDA-509DD2A1FA07" X-Trace: ger.gmane.org 1467291046 27227 80.91.229.3 (30 Jun 2016 12:50:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jun 2016 12:50:46 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10260-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jun 30 14:50:36 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 1bIbQO-0008JW-PO for gllmg-musl@m.gmane.org; Thu, 30 Jun 2016 14:50:32 +0200 Original-Received: (qmail 20074 invoked by uid 550); 30 Jun 2016 12:50:29 -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 20049 invoked from network); 30 Jun 2016 12:50:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:message-id:mime-version:subject:date:references:to:in-reply-to; bh=lRWjntp/1KH2F9Z0jBrdBPjk0BysQM+qMmOcN8wyhLE=; b=HaoO3CPX6qkqSeJCochY28GmW3zMDMbXT1nUKDg/qO5MlkAXk+5yUvRv06U6jz/b8p vLLw/ZgKZDkDPZ7kKF0ShhERx3EB4isS2XrPGkbp/SEvBTLb5s03WQ+LW2t9obb9BWaE t+n0ia7A8pTBKDet3KNJbS4TIANhsEp7Wg9LpbLVRwpDmTsXuW+rpmFV8pYg8w3gzAnb mEezqnoYVucMYVczuvrGpHKw+E4tTHmd05FPIsJtrl6DK8r8yeZgHS0u8t84UjMykDYj WCDVSRNDrDaYKc7bjxS31fieVOVhhAlgCvrCur1yMQWh7l5G6uMT8Bw5LZEEBsAIMNX8 adGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:mime-version:subject:date :references:to:in-reply-to; bh=lRWjntp/1KH2F9Z0jBrdBPjk0BysQM+qMmOcN8wyhLE=; b=V9Qh8Ondjo7J/eGtXmXft4EvIldnftFgzo7wJxx3Hje6ro4zZqSpw8qqGsTv77Wj8n 4bRg06vW4OFF+0zYbpftlEc1v7Xzg5g+A/kO9dqqJO9j0e4D6AuR0WdCS9TkQqk/BPRT yuXMsxbSksX4OODCoLpMC/a6Ir1a/dygM8kW7lXGociwbJvE/IMJeuUmQ34b+1C38BF1 WnqmMoxcdfxt59xIQfIuwO94jXkdKiLyj4IAb+F++wDnjtfu3LEWjpaGLFUpduxSR9xt WdNYLmDSC/LUq5iVe5S2Hi117vTIitXYstVC4W5G/2tiTLqoa8sOYFM0hFO48n+Zbfgw /bcA== X-Gm-Message-State: ALyK8tI6bApNJLk0vH6bfRGX0f1tilU/kN51hZCRYrGhLgjvYXE5uzJMtpFezeuOcMzQwA== X-Received: by 10.194.72.103 with SMTP id c7mr13760202wjv.141.1467291016821; Thu, 30 Jun 2016 05:50:16 -0700 (PDT) In-Reply-To: <20160622194149.GU10893@brightrain.aerifal.cx> X-Mailer: Apple Mail (2.3112) Xref: news.gmane.org gmane.linux.lib.musl.general:10247 Archived-At: --Apple-Mail=_845CB4F0-1B28-47DF-BCDA-509DD2A1FA07 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Le 22 juin 2016 =C3=A0 21:41, Rich Felker a =C3=A9crit= : >=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 = 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. >=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. Actually the latest POSIX spec allows it. See = http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_in= it.html = A workaround for the C++11 constexpr issue should land soon in libcxx = trunk. http://reviews.llvm.org/D21637 Julien= --Apple-Mail=_845CB4F0-1B28-47DF-BCDA-509DD2A1FA07 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Le 22 juin 2016 =C3=A0 21:41, Rich Felker <dalias@libc.org> a = =C3=A9crit :

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.

A workaround for the C++11 constexpr issue should land soon = in libcxx trunk.

Julien
= --Apple-Mail=_845CB4F0-1B28-47DF-BCDA-509DD2A1FA07--