Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 20 Jun 2016 10:37:34 +0100
From: Peter Smith <>
To: Rafael EspĂ­ndola <>
Cc: Lei Zhang <>, llvm-commits <>,,, 
	cfe-commits cfe <>
Subject: Re: [gentoo-musl] Re: Add support for musl-libc on Linux

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.

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

LLVM patch
- 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

- 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.

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

Hope this helps


On 18 June 2016 at 01:52, Rafael EspĂ­ndola <> 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 <> wrote:
>> 2016-06-15 16:28 GMT+08:00 Lei Zhang <>:
>>> 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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.