From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13159 Path: news.gmane.org!.POSTED!not-for-mail From: Jon Chesterfield Newsgroups: gmane.linux.lib.musl.general Subject: Re: clang/musl/linux? Date: Fri, 31 Aug 2018 12:30:08 +0100 Message-ID: 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: multipart/alternative; boundary="000000000000106ff90574b9840d" X-Trace: blaine.gmane.org 1535714913 19643 195.159.176.226 (31 Aug 2018 11:28:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 31 Aug 2018 11:28:33 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-13175-gllmg-musl=m.gmane.org@lists.openwall.com Fri Aug 31 13:28:29 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 1fvhbI-0004tz-Ee for gllmg-musl@m.gmane.org; Fri, 31 Aug 2018 13:28:28 +0200 Original-Received: (qmail 9322 invoked by uid 550); 31 Aug 2018 11:30: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 9304 invoked from network); 31 Aug 2018 11:30:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=WpfGyD9S/Jgu+OSTguVNiX+bo/dmVRQO9XSO2bQmVHU=; b=jtzIIXOer3/lB2wvurbjneIgRRDO8ar2t2uYzOXBtkR8dGimnvaEuS6ffQjHza+C21 J63v1idXLNwxe47iAOcDbMPE+OCp39NdB/Q3kZez7UTJbCd00dFHywCRXMYdeH6FbnoW uTUz9Jaqi2CSI7eKWrRsRmVtrCyCHNK2zQyg78JNLSOOUrj4BFW/jPqC9WzZ8UgqI5xs pU/S09yMqFNe+TpnipskU6CffTr6BpWq5WwVd7lPL7d6ST8adXsF7PEXGmobS30QiIIB bTJWAPWE1KqTwAb6/tiFKbDirTC9U4MKAGhQUw5+20H89SI0r5JFqASLYybdNrtJFT/8 uFYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=WpfGyD9S/Jgu+OSTguVNiX+bo/dmVRQO9XSO2bQmVHU=; b=mIk6xb20XDm8H51V1x/vRf1nzhL/c7EX873d92jST56YnjNm3WZ+/qMo/q30Bg4765 hMYYUivtzujYDQ+EcmT6nXvMig4BM8BQmgZpW1Wr6EZYskN2aYhaVApBpJPHg/ZG2isd XdJgHMGChMhfas7DERWihDjwbfQmlePt+Xsow9th56b6XDXYwkE8gMXIHkK78f1xse0x CYQHacqLjKNkD5jMURc98LQCSqjtu1/AlgDxvhodhs9gC0QDpDce8x+fimVGSUMP0Arr em6qxfrfOi4vmFv/yJftYKg3oj1JRFHQ90xuDuwJu8vNIN04M/oxdhSmcDJbEbmu4hpo 5MQg== X-Gm-Message-State: APzg51AxYQLZYULN5gXG/QaaiscjZG3fb+rJtgqll7Z4Aa7UulvNFq2J I8xV2mHoGYQ3ZsUAOQlFR0hWMBXchvrgb4X3kWujRg== X-Google-Smtp-Source: ANB0VdalgFtI2Cqtrbm7O1+xuot1Tmk8Qxr6Ua4GxMd3fmYjhI34qyj4oYgHxKWlqPFNzpztqtfot2gUEdMVxj3TvXU= X-Received: by 2002:a37:9a8a:: with SMTP id c132-v6mr14719887qke.153.1535715016993; Fri, 31 Aug 2018 04:30:16 -0700 (PDT) In-Reply-To: <50ae2fc8-fd1e-ab32-92fb-94854a84bc9c@gentoo.org> Xref: news.gmane.org gmane.linux.lib.musl.general:13159 Archived-At: --000000000000106ff90574b9840d Content-Type: text/plain; charset="UTF-8" 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 > > --000000000000106ff90574b9840d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 ar= ound assumptions made by the cmake scripts in LLVM. They are subtle to conf= igure.

Combining libunwind, li= bcxxabi and libc++ into a single library makes linking significantly simple= r. Also makes setting rpath simpler.

crti,crtn,crtbegin,crtend can be empty files. Don't use cr= tbegin from bsd.=C2=A0

T= ools 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

<= /div>
Jon

On Fri, 31 Aug 2018, 09:29 Luca Barbato= , <lu_zero@gentoo.org> 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 a= nd 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.or= g/experimental/amd64/musl/

It shouldn't have problems but I did not test it lately.

lu

--000000000000106ff90574b9840d--