From: Lei Zhang <zhanglei.april@gmail.com>
To: Lei Zhang <zhanglei.april@gmail.com>,
llvm-commits <llvm-commits@lists.llvm.org>,
cfe-commits cfe <cfe-commits@lists.llvm.org>,
gentoo-musl@lists.gentoo.org, musl@lists.openwall.com
Subject: Re: [gentoo-musl] Re: Add support for musl-libc on Linux
Date: Mon, 13 Jun 2016 21:50:16 +0800 [thread overview]
Message-ID: <CAOYuCc0t_eyGoOm0oozYmj55eA3Jvb48h7tGOtiMBjGWtDT1RQ@mail.gmail.com> (raw)
In-Reply-To: <20160613132155.GA31934@nyan>
2016-06-13 21:21 GMT+08:00 Felix Janda <felix.janda@posteo.de>:
> [Added CC to the musl list]
>
> Lei Zhang wrote:
>> 2016-06-13 3:07 GMT+08:00 Joerg Sonnenberger <joerg@bec.de>:
>> > 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.
>> >>
>> >> http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160606/161733.html
>> >>
>> >> 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
You're right. Frankly I've only had x86 platforms on my mind so far;
but I agree with Rafael that we could extend this to other archs in
the future.
> 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
>
> http://git.alpinelinux.org/cgit/aports/plain/main/clang/clang-0004-Add-musl-targets-and-dynamic-linker.patch
This looks neat :)
Lei
next prev parent reply other threads:[~2016-06-13 13:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-12 2:51 [gentoo-musl] Add support for musl-libc on Linux Lei Zhang
[not found] ` <20160612190745.GA21691@britannica.bec.de>
2016-06-13 12:20 ` [gentoo-musl] " Lei Zhang
2016-06-13 13:21 ` Felix Janda
2016-06-13 13:50 ` Lei Zhang [this message]
[not found] ` <CAG3jReK_cUOGaOHwQT1gzTBWRVsFuArywZuoXD==m5n-_ZEXKg@mail.gmail.com>
2016-06-14 1:07 ` Lei Zhang
[not found] ` <CAG3jReL2UgYNnnuHeLyxHdpgvTeuQnMu_pAQAfWdWFXs-eCW=w@mail.gmail.com>
2016-06-15 8:28 ` Lei Zhang
2016-06-17 9:50 ` Lei Zhang
[not found] ` <CAG3jReKcdL3Hn5L0sOAAM34CKoUn=J-pusOV+CRyfYRLnvnp4Q@mail.gmail.com>
[not found] ` <CAEt-8LBteTKKdYDa2GUveGNbQu12c3gBgTEeiU5p1ONsTu_VaQ@mail.gmail.com>
2016-06-20 10:59 ` Lei Zhang
[not found] ` <CAEt-8LCQ5H2vE_PXPxs+Gr2=roBT9BuT487w2at3UAKhFqqYxA@mail.gmail.com>
2016-06-20 13:09 ` Lei Zhang
2016-06-20 11:05 ` Lei Zhang
2016-06-21 13:36 ` Lei Zhang
[not found] ` <CAEt-8LCXdLMPyo+d9B5SjR5xQKbSNT_sjXvyffjeMH1V_22csw@mail.gmail.com>
2016-06-22 8:03 ` Lei Zhang
[not found] ` <CAEt-8LA2nA1XXgwiH1Z72vm903V8PH-fsitS_QVAgXkjkzThvQ@mail.gmail.com>
2016-06-24 3:25 ` Lei Zhang
[not found] ` <CAEt-8LBNJ+hn_Ws086H_xZxSK+btFou_e02OCaJ-MxVsXV__wg@mail.gmail.com>
2016-06-25 2:18 ` Lei Zhang
[not found] ` <CAG3jRe+Dud-4Mb8kFZUBMMcM6HUM8YUgVqshgXE7QZTvn8vjiQ@mail.gmail.com>
2016-06-13 13:25 ` Lei Zhang
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=CAOYuCc0t_eyGoOm0oozYmj55eA3Jvb48h7tGOtiMBjGWtDT1RQ@mail.gmail.com \
--to=zhanglei.april@gmail.com \
--cc=cfe-commits@lists.llvm.org \
--cc=gentoo-musl@lists.gentoo.org \
--cc=llvm-commits@lists.llvm.org \
--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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox