mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Peter Smith via llvm-commits <llvm-commits-NBbBogny7ofFcdTEL8lfRQ@public.gmane.org>
To: "Rafael Espíndola"
	<rafael.espindola-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: cfe-commits cfe
	<cfe-commits-NBbBogny7ofFcdTEL8lfRQ@public.gmane.org>,
	musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8@public.gmane.org,
	llvm-commits
	<llvm-commits-NBbBogny7ofFcdTEL8lfRQ@public.gmane.org>,
	gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ@public.gmane.org
Subject: Re: [gentoo-musl] Re: Add support for musl-libc on Linux
Date: Mon, 20 Jun 2016 10:37:34 +0100	[thread overview]
Message-ID: <CAEt-8LBteTKKdYDa2GUveGNbQu12c3gBgTEeiU5p1ONsTu_VaQ@mail.gmail.com> (raw)
In-Reply-To: <CAG3jReKcdL3Hn5L0sOAAM34CKoUn=J-pusOV+CRyfYRLnvnp4Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hello Lei,

I agree with Rafael that this is currently missing a few critical
things right now, especially in the llvm patch.

My (limited) understanding of musl is that it intends to support the
same interface as GNUEABI and GNUEABIHF, but it is obviously a
different implementation.

This is what I could find with a basic grep for GNUAEABI and working
out from there.

Clang patch
I'm assuming you are only intending to support Musl on linux, and not BSD.

ToolChains.cpp
- getDynamicLinker()
There is a Triple.getEnvironment() == llvm::triple::GNUEABIHF which
selects between ld-linux-armhf.so.3 or ld-linux.so.3. I think you'll
need ld-linux-armhf.so.3 for MUSLHF here as well.

LLVM patch
ARMSubtarget.h
- isTargetGNUAEABI()
I think you'll need to check all the callsites of this function, and
check what you want isTargetMusl() to do. At present I think you'll
want them to do the same thing in all cases except finding the
implementation. There looks to be a trade off between adding MUSCL and
MUSCLHF to isTargetGNUAEABI(), adding something like
isTargetGNUAEABIInterface() and adding isTargetMusl() to all the
callsites.

- isTargetEHABICompatible()
I'm making the assumption that musl supports the ARM exceptions EHABI,
if so you'll want to add MUSL and MUSLHF here.

- isTargetHardFloat()
You'll want to add MUSLHF here.

ARMTargetMachine.cpp
- computeTargetABI()
You'll want to add MUSL and MUSLHF alongside GNUEABI and GNUEABIHF in
the switch.

Hope this helps

Peter


On 18 June 2016 at 01:52, Rafael Espíndola <rafael.espindola@gmail.com> wrote:
> There are probably a few more places that need to be patched.
>
> In particular, take a look at lib/Target/ARM. There are things like
> computeTargetABI and isTargetHardFloat that probably need to be
> updated (and tested).
>
> CCing Peter for an arm opinion.
>
> Cheers,
> Rafael
>
>
> On 17 June 2016 at 05:50, Lei Zhang <zhanglei.april@gmail.com> wrote:
>> 2016-06-15 16:28 GMT+08:00 Lei Zhang <zhanglei.april@gmail.com>:
>>> Here's another patch including test cases for various non-x86 archs,
>>> which should just work with my previous patches. ARM is left out
>>> purposely since it involves extra complexity. I'll work on it later.
>>
>> Hi,
>>
>> Here are another two patches which add support for ARM, with some test
>> cases included.
>>
>> They're a lot bigger than previous patches, and I'm not 100% sure if I
>> missed anything. Any comments are utterly welcome :)
>>
>>
>> Lei
_______________________________________________
llvm-commits mailing list
llvm-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits

  parent reply	other threads:[~2016-06-20  9:37 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
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 [this message]
     [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=CAEt-8LBteTKKdYDa2GUveGNbQu12c3gBgTEeiU5p1ONsTu_VaQ@mail.gmail.com \
    --to=llvm-commits-nbbbogny7offcdtel8lfrq@public.gmane.org \
    --cc=cfe-commits-NBbBogny7ofFcdTEL8lfRQ@public.gmane.org \
    --cc=gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ@public.gmane.org \
    --cc=musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8@public.gmane.org \
    --cc=peter.smith-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=rafael.espindola-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).