mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: musl-llvm-clang-libc++
Date: Tue, 6 Jan 2015 12:50:05 -0500	[thread overview]
Message-ID: <20150106175005.GL4574@brightrain.aerifal.cx> (raw)
In-Reply-To: <20150106164313.GH3156@port70.net>

On Tue, Jan 06, 2015 at 05:43:13PM +0100, Szabolcs Nagy wrote:
> * Tomasz Sterna <tomek@xiaoka.com> [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


  parent reply	other threads:[~2015-01-06 17:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-06 14:31 musl-llvm-clang-libc++ Tomasz Sterna
2015-01-06 14:55 ` musl-llvm-clang-libc++ Daniel Cegiełka
2015-01-06 15:06 ` musl-llvm-clang-libc++ Luca Barbato
2015-01-06 16:41   ` musl-llvm-clang-libc++ stephen Turner
2015-01-06 16:43 ` musl-llvm-clang-libc++ Szabolcs Nagy
2015-01-06 17:29   ` musl-llvm-clang-libc++ Szabolcs Nagy
2015-01-06 17:50   ` Rich Felker [this message]
2015-01-06 22:12 ` musl-llvm-clang-libc++ Richard Pennington
2015-01-06 23:43   ` musl-llvm-clang-libc++ Tomasz Sterna
2015-01-07  0:26     ` musl-llvm-clang-libc++ Richard Pennington

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150106175005.GL4574@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).