From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13160 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Golovin Newsgroups: gmane.linux.lib.musl.general Subject: Re: clang/musl/linux? Date: Fri, 31 Aug 2018 14:50:06 +0300 Message-ID: <6169631535716206@iva5-cb9df376e345.qloud-c.yandex.net> References: <1011541533649083@iva4-406defa25fee.qloud-c.yandex.net> <3227001535699954@myt2-dc4bba9bb23c.qloud-c.yandex.net> <50ae2fc8-fd1e-ab32-92fb-94854a84bc9c@gentoo.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1535716095 15226 195.159.176.226 (31 Aug 2018 11:48:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 31 Aug 2018 11:48:15 +0000 (UTC) To: "musl@lists.openwall.com" Original-X-From: musl-return-13176-gllmg-musl=m.gmane.org@lists.openwall.com Fri Aug 31 13:48:11 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1fvhuM-0003qA-8M for gllmg-musl@m.gmane.org; Fri, 31 Aug 2018 13:48:10 +0200 Original-Received: (qmail 24185 invoked by uid 550); 31 Aug 2018 11:50:18 -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 24167 invoked from network); 31 Aug 2018 11:50:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golovin.in; s=mail; t=1535716206; bh=YDRFWJk0vgTXyCmXs+HmaupTEYMHODe41rUEct5DSvc=; h=From:To:In-Reply-To:References:Subject:Date:Message-Id; b=TId0BmpudQXLiwg+H16GeStKr5um97Rq0g/RuL8eaC5aLpOgIfhuR+nAEbJe5B8y0 jLNrxEEXn3yhonyjk8KFmjFfdejukQ0H1zxvkLRW+pK0v44yxIjB03ZhM6PtUE4Fxu UBj2ahhzzG2TRSpBAEC/f0aXIUxRMyQGJJMPooYU= Authentication-Results: mxback15g.mail.yandex.net; dkim=pass header.i=@golovin.in In-Reply-To: X-Mailer: Yamail [ http://yandex.ru ] 5.0 Xref: news.gmane.org gmane.linux.lib.musl.general:13160 Archived-At: Combining libunwind, libcxxabi and libc++ into a single library is a great idea! How exactly did you achieve this? What cmake options did you use? This is how I worked around crtbegin/crtend problem: https://github.com/tpimh/ngtc/blob/f5a210846c349dd7c6a565593568c610e9c3a6d7/root/patch/musl-02-dummy-crts.patch Maybe you would be interested in bundling your toolchain with netbsd-curses and miniz as lightweight alternatives to ncurses and libz (don't know if they will create more problems then solve, though). Regards, Dmitry 31.08.2018, 14:30, "Jon Chesterfield" : > I'm still working on this, off and on. I want to assemble a C++ toolchain that depends on the Linux kernel but nothing else from the distribution. Otherwise I'd use alpine. > > Most of the difficulty has been in working around assumptions made by the cmake scripts in LLVM. They are subtle to configure. > > Combining libunwind, libcxxabi and libc++ into a single library makes linking significantly simpler. Also makes setting rpath simpler. > > crti,crtn,crtbegin,crtend can be empty files. Don't use crtbegin from bsd. > > Tools like clang, lld have dependencies on other libraries. zlib, curses etc. Disabling these in the cmake files broke apparently unrelated things. My next step is to debug that or start building the supporting libraries. > > Musl itself has caused me no problems in any of the above. > > Cheers > > Jon > > On Fri, 31 Aug 2018, 09:29 Luca Barbato, wrote: >> On 31/08/2018 09:19, Dmitry Golovin wrote: >>> There should not be any problems building LLVM and musl on glibc-based distro. The reason why I'm building on Alpine is that I want my llvm and clang to be linked against musl (this is what I need patches for). On a glibc-based distro no patches are needed and you can use musl-clang wrapper to produce binaries linked against musl. >> >> Another way is using this >> https://wiki.gentoo.org/wiki/Clang >> with >> http://distfiles.gentoo.org/experimental/amd64/musl/ >> >> It shouldn't have problems but I did not test it lately. >> >> lu