mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Felix Janda via cfe-commits <cfe-commits-NBbBogny7ofFcdTEL8lfRQ@public.gmane.org>
To: Lei Zhang <zhanglei.april-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ@public.gmane.org,
	musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8@public.gmane.org,
	llvm-commits-NBbBogny7ofFcdTEL8lfRQ@public.gmane.org,
	cfe-commits-NBbBogny7ofFcdTEL8lfRQ@public.gmane.org
Subject: Re: [gentoo-musl] Re: Add support for musl-libc on Linux
Date: Mon, 13 Jun 2016 15:21:55 +0200	[thread overview]
Message-ID: <20160613132155.GA31934@nyan> (raw)
In-Reply-To: <CAOYuCc1NZNxEPLonrHD++QPTYgq90Bwz0B16CLXiJrEAf-zNJQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

[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

armv7a-hardfloat-linux-musleabi

and the dynamic linker name

/lib/ld-musl-armhf.so.1

Generally, the dynamic linker name takes the form
"/lib/ld-musl-$ARCH$SUBARCH.so.1", 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

http://git.alpinelinux.org/cgit/aports/plain/main/clang/clang-0004-Add-musl-targets-and-dynamic-linker.patch

Felix
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

       reply	other threads:[~2016-06-13 13:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAOYuCc1atr0QjQud-nxdj3rPN0Hj16u__kAs5LRmU+Ff6shtBA@mail.gmail.com>
     [not found] ` <20160612190745.GA21691@britannica.bec.de>
     [not found]   ` <CAOYuCc1NZNxEPLonrHD++QPTYgq90Bwz0B16CLXiJrEAf-zNJQ@mail.gmail.com>
     [not found]     ` <CAOYuCc1NZNxEPLonrHD++QPTYgq90Bwz0B16CLXiJrEAf-zNJQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-13 13:21       ` Felix Janda via cfe-commits [this message]
2016-06-13 13:50         ` Lei Zhang
     [not found]           ` <CAOYuCc0t_eyGoOm0oozYmj55eA3Jvb48h7tGOtiMBjGWtDT1RQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-13 21:00             ` Rafael Espíndola via llvm-commits
     [not found]               ` <CAG3jReK_cUOGaOHwQT1gzTBWRVsFuArywZuoXD==m5n-_ZEXKg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-14  1:07                 ` Lei Zhang via llvm-commits
     [not found]                   ` <CAOYuCc3gtPz8XhGyAsDcsCjvZPLDwSAGOXwXeu=urXmwck61mQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-14 12:55                     ` Rafael Espíndola via cfe-commits
2016-06-15  8:28                       ` Lei Zhang via cfe-commits
     [not found]                         ` <CAOYuCc125C-5QjqWhK-QuU4zZvTqb+OsZhxQjowJidZaYBYY4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-15 20:09                           ` Rafael Espíndola via cfe-commits
2016-06-17  9:50                           ` Lei Zhang via cfe-commits
     [not found]                             ` <CAOYuCc3C27jqG8uyCOkDgcOAcgaFXEz7k9O8+Tqyjv9WYH2M1Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-18  0:52                               ` Rafael Espíndola via cfe-commits
     [not found]                                 ` <CAG3jReKcdL3Hn5L0sOAAM34CKoUn=J-pusOV+CRyfYRLnvnp4Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-20  9:37                                   ` Peter Smith via llvm-commits
     [not found]                                     ` <CAEt-8LBteTKKdYDa2GUveGNbQu12c3gBgTEeiU5p1ONsTu_VaQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-20 10:59                                       ` Lei Zhang via cfe-commits
2016-06-20 11:28                                         ` Szabolcs Nagy
     [not found]                                         ` <CAOYuCc2yxgYFSzDjJP0SJho5Hs=zb635ysinwbg=SZ=CZJt9_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-20 11:44                                           ` Peter Smith via cfe-commits
     [not found]                                             ` <CAEt-8LCQ5H2vE_PXPxs+Gr2=roBT9BuT487w2at3UAKhFqqYxA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-20 13:09                                               ` Lei Zhang via llvm-commits
2016-06-20 11:05                                   ` Lei Zhang via llvm-commits
     [not found]                                     ` <CAOYuCc1+_xKLK2FOvCKNpKO4BZO07hd2Cbft8p_YO3chSR41UA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-21 13:36                                       ` Lei Zhang via cfe-commits
     [not found]                                         ` <CAOYuCc1_5a15MZ4tEQZAn84rf3Y7dzugzX1TTpSgACQ+d_k3Aw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-21 15:07                                           ` Peter Smith via cfe-commits
     [not found]                                             ` <CAEt-8LCXdLMPyo+d9B5SjR5xQKbSNT_sjXvyffjeMH1V_22csw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-22  8:03                                               ` Lei Zhang via llvm-commits
     [not found]                                                 ` <CAOYuCc3A-tf1LUVHtuUjAfjphRvrJfAbQUaC_bVPEyNTP=LQQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-22  8:55                                                   ` Peter Smith via llvm-commits
     [not found]                                                     ` <CAEt-8LA2nA1XXgwiH1Z72vm903V8PH-fsitS_QVAgXkjkzThvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-24  3:25                                                       ` Lei Zhang via cfe-commits
     [not found]                                                         ` <CAOYuCc3h1LvG4Ky8u8EqC6x12jg_c3XLUjo3BLuOQkQphVJUSQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-24  8:02                                                           ` Peter Smith via cfe-commits
     [not found]                                                             ` <CAEt-8LBNJ+hn_Ws086H_xZxSK+btFou_e02OCaJ-MxVsXV__wg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-25  2:18                                                               ` Lei Zhang via cfe-commits
2016-06-14  8:47               ` Szabolcs Nagy

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=20160613132155.GA31934@nyan \
    --to=cfe-commits-nbbbogny7offcdtel8lfrq@public.gmane.org \
    --cc=felix.janda-1KBjaw7Xf1+zQB+pC5nmwQ@public.gmane.org \
    --cc=gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ@public.gmane.org \
    --cc=llvm-commits-NBbBogny7ofFcdTEL8lfRQ@public.gmane.org \
    --cc=musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8@public.gmane.org \
    --cc=zhanglei.april-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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).