From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10112 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Rafael_Esp=C3=ADndola?= via llvm-commits Newsgroups: gmane.comp.compilers.llvm.cvs,gmane.linux.lib.musl.general,gmane.comp.compilers.clang.scm Subject: Re: [gentoo-musl] Re: Add support for musl-libc on Linux Date: Mon, 13 Jun 2016 17:00:17 -0400 Message-ID: References: <20160612190745.GA21691@britannica.bec.de> <20160613132155.GA31934@nyan> Reply-To: =?UTF-8?Q?Rafael_Esp=C3=ADndola?= NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3643608808096837757==" X-Trace: ger.gmane.org 1465851725 9029 80.91.229.3 (13 Jun 2016 21:02:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Jun 2016 21:02:05 +0000 (UTC) Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ@public.gmane.org, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8@public.gmane.org, llvm-commits , cfe-commits cfe To: Lei Zhang Original-X-From: llvm-commits-bounces-NBbBogny7ofFcdTEL8lfRQ@public.gmane.org Mon Jun 13 23:01:56 2016 Return-path: Envelope-to: gcclc-llvm-cvs-Uylq5CNFT+jYtjvyW6yDsg@public.gmane.org Original-Received: from lists.llvm.org ([54.67.122.174]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bCYy8-0001gH-Dn for gcclc-llvm-cvs-Uylq5CNFT+jYtjvyW6yDsg@public.gmane.org; Mon, 13 Jun 2016 23:00:24 +0200 Original-Received: from ip-172-31-13-177.us-west-1.compute.internal (localhost [127.0.0.1]) by lists.llvm.org (Postfix) with ESMTP id CAD5A81C34; Mon, 13 Jun 2016 13:56:53 -0700 (PDT) Original-Received: from mail-qk0-f173.google.com (mail-qk0-f173.google.com [209.85.220.173]) by lists.llvm.org (Postfix) with ESMTP id D6FC0804C8; Mon, 13 Jun 2016 13:56:51 -0700 (PDT) Original-Received: by mail-qk0-f173.google.com with SMTP id c73so52066718qkg.2; Mon, 13 Jun 2016 14:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=uknJxD3+9ec8T+TXfJvay1bszFppcmyQbY4Iq6hSfVk=; b=KOXxfKBIMWnuUFnANrBZDVJgkCG38aBd/Kclu+Mx/eB37IYPOeBnP7AS8oPP2yc/Tr C2kH4sNembMlUWI4tK8Zp2BIYxGzUoSC/4KRSMOyTwN7HOHX+lj1DCyr47mqg/O/dpUd 5YWZ9MQIYsp2kl7kgNv2Gsvr8U3Ar3xMrujIxHs4xzgr+C39Uhd+DkCGA3VkTZYxJhLL YZ5lILF3wXXtD2mHueFSHNxgNqRel3Un7g2aGecFzrJC/mkyAjVgOK7BWG955W5ypt/R b0DZEUP80pSRjSUx3XS9TvAVBqil3BT0ZDebJRW03mVltuKvB6jW3NM9f8NpB4nikeGJ 4vQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=uknJxD3+9ec8T+TXfJvay1bszFppcmyQbY4Iq6hSfVk=; b=fsnEwGQdhVwsRqVftEMOKa5NvwsSaGw2Y/YEnmVNkKSadv1kxdrlmvQh0ZfChH5Yxz PElozy9IeX3LnwLQX3aqNjjMbN5+/aR23Cu9a2tXefliut6ElrTI/IjLiq1qNQGedgiS lWq2L8TODd1cmYDnoYFuah+YL0EcwdEwV/9X//VHCu71I0EZCyvHzcs+0v3DPv9qI+Is 6u3DrtqhvM5ZVhUVZ3Ojicr5gaOglxlmediYjARzCc8Z+SJQig2wYPu0zJB0Hx9BJ/Ak BICkE0PIHDnnm5jxjTIYypPDtug/6ASXSHLm0z1L9kXumJiWuwIy8I3/Wm6lqgOMJvHM yrzA== X-Gm-Message-State: ALyK8tJLRd35/HGMzzkATRmAMgT9RvohLbvXDJbKlpmkUar5dz12SXZ+NjV6cN3RKiVVJP3BhkA0z+grJj6Qcw== X-Received: by 10.55.97.14 with SMTP id v14mr17652655qkb.39.1465851618080; Mon, 13 Jun 2016 14:00:18 -0700 (PDT) Original-Received: by 10.200.39.186 with HTTP; Mon, 13 Jun 2016 14:00:17 -0700 (PDT) Original-Received: by 10.200.39.186 with HTTP; Mon, 13 Jun 2016 14:00:17 -0700 (PDT) In-Reply-To: X-BeenThere: llvm-commits-NBbBogny7ofFcdTEL8lfRQ@public.gmane.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Commit Messages and Patches for LLVM List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: llvm-commits-bounces-NBbBogny7ofFcdTEL8lfRQ@public.gmane.org Original-Sender: "llvm-commits" Xref: news.gmane.org gmane.comp.compilers.llvm.cvs:335513 gmane.linux.lib.musl.general:10112 gmane.comp.compilers.clang.scm:155290 Archived-At: --===============3643608808096837757== Content-Type: multipart/alternative; boundary=001a11482bb0fd3de705352f2cb2 --001a11482bb0fd3de705352f2cb2 Content-Type: text/plain; charset=UTF-8 Do you need someone to commit it for you? On Jun 13, 2016 9:50 AM, "Lei Zhang via cfe-commits" < cfe-commits-NBbBogny7ofFcdTEL8lfRQ@public.gmane.org> wrote: > 2016-06-13 21:21 GMT+08:00 Felix Janda : > > [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. > >> >> > >> >> > 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 > _______________________________________________ > cfe-commits mailing list > cfe-commits-NBbBogny7ofFcdTEL8lfRQ@public.gmane.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits > --001a11482bb0fd3de705352f2cb2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Do you need someone to commit it for you?

On Jun 13, 2016 9:50 AM, "Lei Zhang via cfe= -commits" <cfe-commit= s@lists.llvm.org> wrote:
2016-06-13 21:21 GMT+08:00 Felix Janda <felix.janda-1KBjaw7Xf1+zQB+pC5nmwQ@public.gmane.org>:
> [Added CC to the musl list]
>
> Lei Zhang wrote:
>> 2016-06-13 3:07 GMT+08:00 Joerg Sonnenberger <joerg-DE4+3rq1sLY@public.gmane.org>:
>> > 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 subsc= ribed to the list,
>> >> thus cannot reply to it directly.
>> >>
>> >> http:/= /lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160606/161733.html<= br> >> >>
>> >> Joerg, thanks for your reply. Could you please tell me wh= at 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 vali= dation 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=C2=A0 =C2=A0(revision 272546)
>> +++ lib/Driver/ToolChains.cpp=C2=A0 =C2=A0(working copy)
>> @@ -4152,6 +4152,8 @@
>>
>>=C2=A0 =C2=A0 if (Triple.isAndroid())
>>=C2=A0 =C2=A0 =C2=A0 return Triple.isArch64Bit() ? "/system/bi= n/linker64" : "/system/bin/linker";
>> +=C2=A0 else if (Triple.getEnvironment() =3D=3D llvm::Triple::Musl= )
>> +=C2=A0 =C2=A0 return "/lib/ld-musl-" + Triple.getArchNa= me().str() + ".so.1";
>
> It does not seem to me that the dynamic linker name detection will wor= k
> on most archs not in the test cases. For example, the arm gentoo musl<= br> > 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 b= e
> very interesting, but it would be nice to have a more intelligent patc= h.
> 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
_______________________________________________
cfe-commits mailing list
cfe-commits-NBbBogny7ofFcdTEL8lfRQ@public.gmane.org
http://lists.llvm.org/cgi-bin/mailman/lis= tinfo/cfe-commits
--001a11482bb0fd3de705352f2cb2-- --===============3643608808096837757== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbGx2bS1jb21t aXRzIG1haWxpbmcgbGlzdApsbHZtLWNvbW1pdHNAbGlzdHMubGx2bS5vcmcKaHR0cDovL2xpc3Rz Lmxsdm0ub3JnL2NnaS1iaW4vbWFpbG1hbi9saXN0aW5mby9sbHZtLWNvbW1pdHMK --===============3643608808096837757==--