Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 13 Jun 2016 15:21:55 +0200
From: Felix Janda <>
To: Lei Zhang <>
Subject: Re: [gentoo-musl] Re: Add support for musl-libc on Linux

[Added CC to the musl list]

Lei Zhang wrote:
> 2016-06-13 3:07 GMT+08:00 Joerg Sonnenberger <>:
> > On Sun, Jun 12, 2016 at 10:51:11AM +0800, Lei Zhang via llvm-commits wrote:
> >> Hi,
> >>
> >> I'm replying to this thread; sorry I wasn't subscribed to the list,
> >> thus cannot reply to it directly.
> >>
> >>
> >>
> >> Joerg, thanks for your reply. Could you please tell me what kind of
> >> test cases I should prepare?
> >
> > The target/triple parser has a unit test in
> > unittests/ADT/TripleTest.cpp. The rest should get output validation in
> > clang's test/Driver directory. Not sure which one is the primary
> > GNU/Linux test.
> Thanks for the pointer :)
> The patches are re-attached with test cases included. Do they look sane enough?

> --- lib/Driver/ToolChains.cpp   (revision 272546)
> +++ lib/Driver/ToolChains.cpp   (working copy)
> @@ -4152,6 +4152,8 @@
>    if (Triple.isAndroid())
>      return Triple.isArch64Bit() ? "/system/bin/linker64" : "/system/bin/linker";
> +  else if (Triple.getEnvironment() == llvm::Triple::Musl)
> +    return "/lib/ld-musl-" + Triple.getArchName().str() + ".so.1";

It does not seem to me that the dynamic linker name detection will work
on most archs not in the test cases. For example, the arm gentoo musl
stage3's have the target triple


and the dynamic linker name


Generally, the dynamic linker name takes the form
"/lib/ld-musl-$ARCH$", where the definite source for the
values of $ARCH and $SUBARCH is musl's configure script.

It seems difficult to get all cases right and some of them might not be
very interesting, but it would be nice to have a more intelligent patch.
See for example


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.