<p dir="ltr">Do you need someone to commit it for you?</p>
<div class="gmail_quote">On Jun 13, 2016 9:50 AM, "Lei Zhang via cfe-commits" <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2016-06-13 21:21 GMT+08:00 Felix Janda <<a href="mailto:felix.janda@posteo.de">felix.janda@posteo.de</a>>:<br>
> [Added CC to the musl list]<br>
><br>
> Lei Zhang wrote:<br>
>> 2016-06-13 3:07 GMT+08:00 Joerg Sonnenberger <<a href="mailto:joerg@bec.de">joerg@bec.de</a>>:<br>
>> > On Sun, Jun 12, 2016 at 10:51:11AM +0800, Lei Zhang via llvm-commits wrote:<br>
>> >> Hi,<br>
>> >><br>
>> >> I'm replying to this thread; sorry I wasn't subscribed to the list,<br>
>> >> thus cannot reply to it directly.<br>
>> >><br>
>> >> <a href="http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160606/161733.html" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160606/161733.html</a><br>
>> >><br>
>> >> Joerg, thanks for your reply. Could you please tell me what kind of<br>
>> >> test cases I should prepare?<br>
>> ><br>
>> > The target/triple parser has a unit test in<br>
>> > unittests/ADT/TripleTest.cpp. The rest should get output validation in<br>
>> > clang's test/Driver directory. Not sure which one is the primary<br>
>> > GNU/Linux test.<br>
>><br>
>> Thanks for the pointer :)<br>
>><br>
>> The patches are re-attached with test cases included. Do they look sane enough?<br>
><br>
>> --- lib/Driver/ToolChains.cpp   (revision 272546)<br>
>> +++ lib/Driver/ToolChains.cpp   (working copy)<br>
>> @@ -4152,6 +4152,8 @@<br>
>><br>
>>    if (Triple.isAndroid())<br>
>>      return Triple.isArch64Bit() ? "/system/bin/linker64" : "/system/bin/linker";<br>
>> +  else if (Triple.getEnvironment() == llvm::Triple::Musl)<br>
>> +    return "/lib/ld-musl-" + Triple.getArchName().str() + ".so.1";<br>
><br>
> It does not seem to me that the dynamic linker name detection will work<br>
> on most archs not in the test cases. For example, the arm gentoo musl<br>
> stage3's have the target triple<br>
<br>
You're right. Frankly I've only had x86 platforms on my mind so far;<br>
but I agree with Rafael that we could extend this to other archs in<br>
the future.<br>
<br>
> It seems difficult to get all cases right and some of them might not be<br>
> very interesting, but it would be nice to have a more intelligent patch.<br>
> See for example<br>
><br>
> <a href="http://git.alpinelinux.org/cgit/aports/plain/main/clang/clang-0004-Add-musl-targets-and-dynamic-linker.patch" rel="noreferrer" target="_blank">http://git.alpinelinux.org/cgit/aports/plain/main/clang/clang-0004-Add-musl-targets-and-dynamic-linker.patch</a><br>
<br>
This looks neat :)<br>
<br>
<br>
Lei<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>