From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6799 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl-llvm-clang-libc++ Date: Tue, 6 Jan 2015 17:43:13 +0100 Message-ID: <20150106164313.GH3156@port70.net> References: <1420554703.1028.19.camel@xiaoka.com> 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 1420562699 16586 80.91.229.3 (6 Jan 2015 16:44:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Jan 2015 16:44:59 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6812-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jan 06 17:44:55 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 1Y8XE9-0006GE-ES for gllmg-musl@m.gmane.org; Tue, 06 Jan 2015 17:43:29 +0100 Original-Received: (qmail 15547 invoked by uid 550); 6 Jan 2015 16:43:27 -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 15534 invoked from network); 6 Jan 2015 16:43:27 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <1420554703.1028.19.camel@xiaoka.com> User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:6799 Archived-At: * 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) - clang does not support c99 fenv and -frounding-math flag so fenv tests are broken, but i didnt see incorrect results because of this - long double is broken for some reason: strtod, and most long double math functions give bad results in some cases, needs more investigation.. > > If you want to toy around with it you can install it directly from repo. > > # mkdir /mnt/test # I usually mount a btrfs subvolume here > # apk.static --repository http://ftp.d-os.eu/latest/core --update-cache --allow-untrusted --root /mnt/test --initdb add dos-base dos-sdk libcxx-dev > > It is based on great work of Alpine Linux. > Still heavily work-in-progress and very rough on edges, but I think it > may be very useful for people trying to get free of GNU libc, libstdc++ > and GCC bits, so I decided to share early. > Also it is good to have some more eyes on as there is a lot of guesswork > there. > > The apk sources with required patches and some quick notes are on > GitHub: https://github.com/D-os/aports/tree/master/core > > > [1] http://wiki.musl-libc.org/wiki/BuildingLLVM > [2] http://www.openwall.com/lists/musl/2014/04/22/2 > [3] http://llvm.org/bugs/show_bug.cgi?id=7276 > > -- > Tomasz Sterna :(){ :|:&};: > Instant Messaging Consultant Open Source Developer > http://abadcafe.pl/ http://xiaoka.com/portfolio >