From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6802 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl-llvm-clang-libc++ Date: Tue, 6 Jan 2015 12:50:05 -0500 Message-ID: <20150106175005.GL4574@brightrain.aerifal.cx> References: <1420554703.1028.19.camel@xiaoka.com> <20150106164313.GH3156@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1420566632 16828 80.91.229.3 (6 Jan 2015 17:50:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Jan 2015 17:50:32 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6815-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jan 06 18:50:27 2015 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 1Y8YGo-00055Z-P4 for gllmg-musl@m.gmane.org; Tue, 06 Jan 2015 18:50:18 +0100 Original-Received: (qmail 20345 invoked by uid 550); 6 Jan 2015 17:50:17 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 20334 invoked from network); 6 Jan 2015 17:50:17 -0000 Content-Disposition: inline In-Reply-To: <20150106164313.GH3156@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:6802 Archived-At: On Tue, Jan 06, 2015 at 05:43:13PM +0100, Szabolcs Nagy wrote: > * Tomasz Sterna [2015-01-06 15:31:43 +0100]: > > You might be interested to know, that I managed to build a > > musl + LLVM (clang, libc++) based, self hosted system. > > > > The hardest part was to scrub libgcc and libstdc++ dependencies. > > Using instructions from Wiki[1] and hints from this list[2] and LLVM > > bugtracker[3] I finally managed to get a self-hosting system able to > > rebuild itself clean without any GCC help. > > nice > > > It requires a bit arm-twisting to LLVM compiler and libs, but it looks > > like it works just fine. The musl/libc++/clang++ env is able to build > > working libc++ and clang++, which I consider GoodEnough(TM) test case. > > i ran http://repo.or.cz/w/libc-test.git on it and it turned up > some float bugs: > > - musl's FLT_ROUND is wrong: it should reflect the current rounding mode > (i found this because clang float.h was used when comiling the tests > instead of musl's which may or may not be a problem) This behavior is copied from GCC. We'll need to define a new ABI for the header to provide a runtime-variable value I think. The definition should probably be removed from bits files _except_ on archs without fenv; then, the top-level float.h can define it to use the new runtime-variable value unless it's already defined as a constant by the bits file. > - clang does not support c99 fenv and -frounding-math flag so fenv tests > are broken, but i didnt see incorrect results because of this GCC is pretty similar here. It doesn't properly support them (even though it sort of claims to) but things "mostly work" unless you get unlucky... > - long double is broken for some reason: strtod, and most long double > math functions give bad results in some cases, needs more investigation.. That's really ugly/bad... :( Hopefully we can find the cause and get it fixed soon. Unless this is just a build failure, future documentation versions (arg, docs are way out of date!) will probably need to mention that non-latest clang doesn't work for x86[_64] due to major floating point bugs. Rich