mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Dmitry Golovin <dima@golovin.in>
To: "musl@lists.openwall.com" <musl@lists.openwall.com>
Subject: Re: clang/musl/linux?
Date: Fri, 31 Aug 2018 14:50:06 +0300	[thread overview]
Message-ID: <6169631535716206@iva5-cb9df376e345.qloud-c.yandex.net> (raw)
In-Reply-To: <CAOUYtQB_5SBjDYmza9fFhW7BEYHg93f=ysGXyEsoGYwtJaJm+g@mail.gmail.com>

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" <jonathanchesterfield@gmail.com>:
> 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, <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 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


  reply	other threads:[~2018-08-31 11:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-07 13:19 clang/musl/linux? Jon Chesterfield
2018-08-07 13:38 ` clang/musl/linux? Dmitry Golovin
2018-08-31  6:29   ` clang/musl/linux? Fāng-ruì Sòng
2018-08-31  7:19     ` clang/musl/linux? Dmitry Golovin
2018-08-31  8:29       ` clang/musl/linux? Luca Barbato
2018-08-31 11:30         ` clang/musl/linux? Jon Chesterfield
2018-08-31 11:50           ` Dmitry Golovin [this message]
2018-08-31 13:13             ` clang/musl/linux? Jon Chesterfield
2018-08-31 14:24 ` clang/musl/linux? Khem Raj

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=6169631535716206@iva5-cb9df376e345.qloud-c.yandex.net \
    --to=dima@golovin.in \
    --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).