mailing list of musl libc
 help / color / mirror / code / Atom feed
* Dynamic linker name
@ 2016-06-06  1:47 Lei Zhang
  2016-06-06  2:57 ` Rich Felker
  2016-06-14 14:43 ` Khem Raj
  0 siblings, 2 replies; 15+ messages in thread
From: Lei Zhang @ 2016-06-06  1:47 UTC (permalink / raw)
  To: musl, Luca Barbato

Hi,

I'm trying to make a few changes to clang/LLVM to make it work with
musl, i.e. link executables against musl instead of glibc.

One of the changes involved is to tell clang where to find musl's
dynamic linker. My question is: is musl's dynamic linker always named
"ld-musl-$ARCH.so.1" and put under /lib?

More specifically, on a multilib system, which of the following is encouraged?

1. /lib/ld-musl-{x86,x86_64}.so.1
2. /lib32/ld-musl-x86.so.1 and /lib64/ld-musl-x86_64.so.1


Thanks,
Lei


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamic linker name
  2016-06-06  1:47 Dynamic linker name Lei Zhang
@ 2016-06-06  2:57 ` Rich Felker
  2016-06-14 14:43 ` Khem Raj
  1 sibling, 0 replies; 15+ messages in thread
From: Rich Felker @ 2016-06-06  2:57 UTC (permalink / raw)
  To: Lei Zhang; +Cc: musl, Luca Barbato

On Mon, Jun 06, 2016 at 09:47:10AM +0800, Lei Zhang wrote:
> Hi,
> 
> I'm trying to make a few changes to clang/LLVM to make it work with
> musl, i.e. link executables against musl instead of glibc.
> 
> One of the changes involved is to tell clang where to find musl's
> dynamic linker. My question is: is musl's dynamic linker always named
> "ld-musl-$ARCH.so.1" and put under /lib?
> 
> More specifically, on a multilib system, which of the following is encouraged?
> 
> 1. /lib/ld-musl-{x86,x86_64}.so.1
> 2. /lib32/ld-musl-x86.so.1 and /lib64/ld-musl-x86_64.so.1

It's always /lib/, not /lib32/ or /lib64/.

Rich


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamic linker name
  2016-06-06  1:47 Dynamic linker name Lei Zhang
  2016-06-06  2:57 ` Rich Felker
@ 2016-06-14 14:43 ` Khem Raj
  2016-06-14 15:04   ` Szabolcs Nagy
  1 sibling, 1 reply; 15+ messages in thread
From: Khem Raj @ 2016-06-14 14:43 UTC (permalink / raw)
  To: musl; +Cc: Luca Barbato

[-- Attachment #1: Type: text/plain, Size: 729 bytes --]

On Jun 5, 2016 6:47 PM, "Lei Zhang" <zhanglei.april@gmail.com> wrote:
>
> Hi,
>
> I'm trying to make a few changes to clang/LLVM to make it work with
> musl, i.e. link executables against musl instead of glibc.
>
> One of the changes involved is to tell clang where to find musl's
> dynamic linker. My question is: is musl's dynamic linker always named
> "ld-musl-$ARCH.so.1" and put under /lib?
>
> More specifically, on a multilib system, which of the following is
encouraged?
>
> 1. /lib/ld-musl-{x86,x86_64}.so.1
> 2. /lib32/ld-musl-x86.so.1 and /lib64/ld-musl-x86_64.so.1

There is a llvm clang patch for this already. Look at

https://github.com/kraj/meta-clang/tree/master/recipes-devtools/clang/clang
>
>
> Thanks,
> Lei

[-- Attachment #2: Type: text/html, Size: 1088 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamic linker name
  2016-06-14 14:43 ` Khem Raj
@ 2016-06-14 15:04   ` Szabolcs Nagy
  2016-06-14 15:09     ` Khem Raj
  2016-06-14 15:11     ` Rafael Espíndola
  0 siblings, 2 replies; 15+ messages in thread
From: Szabolcs Nagy @ 2016-06-14 15:04 UTC (permalink / raw)
  To: musl; +Cc: Khem Raj, Luca Barbato, Rafael Esp?ndola

* Khem Raj <raj.khem@gmail.com> [2016-06-14 07:43:34 -0700]:
> On Jun 5, 2016 6:47 PM, "Lei Zhang" <zhanglei.april@gmail.com> wrote:
> > One of the changes involved is to tell clang where to find musl's
> > dynamic linker. My question is: is musl's dynamic linker always named
> > "ld-musl-$ARCH.so.1" and put under /lib?
> 
> There is a llvm clang patch for this already. Look at
> 
> https://github.com/kraj/meta-clang/tree/master/recipes-devtools/clang/clang

i think these should be upstreamed into clang and
the recent r272662 clang commit should be reverted
and the existing mips musl hacks should be fixed too.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamic linker name
  2016-06-14 15:04   ` Szabolcs Nagy
@ 2016-06-14 15:09     ` Khem Raj
  2016-06-14 15:11     ` Rafael Espíndola
  1 sibling, 0 replies; 15+ messages in thread
From: Khem Raj @ 2016-06-14 15:09 UTC (permalink / raw)
  To: Rafael Esp?ndola, musl, Luca Barbato

[-- Attachment #1: Type: text/plain, Size: 756 bytes --]

On Jun 14, 2016 8:04 AM, "Szabolcs Nagy" <nsz@port70.net> wrote:
>
> * Khem Raj <raj.khem@gmail.com> [2016-06-14 07:43:34 -0700]:
> > On Jun 5, 2016 6:47 PM, "Lei Zhang" <zhanglei.april@gmail.com> wrote:
> > > One of the changes involved is to tell clang where to find musl's
> > > dynamic linker. My question is: is musl's dynamic linker always named
> > > "ld-musl-$ARCH.so.1" and put under /lib?
> >
> > There is a llvm clang patch for this already. Look at
> >
> >
https://github.com/kraj/meta-clang/tree/master/recipes-devtools/clang/clang
>
> i think these should be upstreamed into clang and
> the recent r272662 clang commit should be reverted
> and the existing mips musl hacks should be fixed too.

I planned to do that but was off for few weeks

[-- Attachment #2: Type: text/html, Size: 1198 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamic linker name
  2016-06-14 15:04   ` Szabolcs Nagy
  2016-06-14 15:09     ` Khem Raj
@ 2016-06-14 15:11     ` Rafael Espíndola
  2016-06-14 15:56       ` Lei Zhang
  1 sibling, 1 reply; 15+ messages in thread
From: Rafael Espíndola @ 2016-06-14 15:11 UTC (permalink / raw)
  To: musl, Khem Raj, Luca Barbato

[-- Attachment #1: Type: text/plain, Size: 891 bytes --]

Sorry, but my understanding is that r272662 is correct for x86, no?

We can definitely add support for more arches with musl if someone sends a
patch to the list.

Cheers,
Rafael
On Jun 14, 2016 11:04 AM, "Szabolcs Nagy" <nsz@port70.net> wrote:

> * Khem Raj <raj.khem@gmail.com> [2016-06-14 07:43:34 -0700]:
> > On Jun 5, 2016 6:47 PM, "Lei Zhang" <zhanglei.april@gmail.com> wrote:
> > > One of the changes involved is to tell clang where to find musl's
> > > dynamic linker. My question is: is musl's dynamic linker always named
> > > "ld-musl-$ARCH.so.1" and put under /lib?
> >
> > There is a llvm clang patch for this already. Look at
> >
> >
> https://github.com/kraj/meta-clang/tree/master/recipes-devtools/clang/clang
>
> i think these should be upstreamed into clang and
> the recent r272662 clang commit should be reverted
> and the existing mips musl hacks should be fixed too.
>

[-- Attachment #2: Type: text/html, Size: 1488 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamic linker name
  2016-06-14 15:11     ` Rafael Espíndola
@ 2016-06-14 15:56       ` Lei Zhang
  2016-06-15  3:06         ` Lei Zhang
  0 siblings, 1 reply; 15+ messages in thread
From: Lei Zhang @ 2016-06-14 15:56 UTC (permalink / raw)
  To: musl; +Cc: Khem Raj, Luca Barbato

2016-06-14 23:11 GMT+08:00 Rafael Espíndola <rafael.espindola@gmail.com>:
> Sorry, but my understanding is that r272662 is correct for x86, no?
>
> We can definitely add support for more arches with musl if someone sends a
> patch to the list.

If no one intends to do this, I can prepare further patches and
relevant test cases for other archs.


Lei


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamic linker name
  2016-06-14 15:56       ` Lei Zhang
@ 2016-06-15  3:06         ` Lei Zhang
  2016-06-15  7:10           ` Felix Janda
  0 siblings, 1 reply; 15+ messages in thread
From: Lei Zhang @ 2016-06-15  3:06 UTC (permalink / raw)
  To: musl; +Cc: Khem Raj, Luca Barbato

2016-06-14 23:56 GMT+08:00 Lei Zhang <zhanglei.april@gmail.com>:
> 2016-06-14 23:11 GMT+08:00 Rafael Espíndola <rafael.espindola@gmail.com>:
>> Sorry, but my understanding is that r272662 is correct for x86, no?
>>
>> We can definitely add support for more arches with musl if someone sends a
>> patch to the list.
>
> If no one intends to do this, I can prepare further patches and
> relevant test cases for other archs.

Now I'm determining the $ARCH field in musl's dynamic linker name for
non-x86 archs. After reading these two patches (thanks to their
authors):

http://git.alpinelinux.org/cgit/aports/plain/main/clang/clang-0004-Add-musl-targets-and-dynamic-linker.patch
https://github.com/kraj/meta-clang/blob/master/recipes-devtools/clang/clang/0001-clang-driver-Add-musl-ldso-support.patch

I got the following list:

i386
x86_64
arm
armhf
armeb
armebhf
aarch64
aarch64_be
mips
mipsel
mips64
mipsel64el // this one looks weird
powerpc
powerpc64

Is this list comprehensive? Is there anything wrong? I have no access
to non-x86 machines at the moment, thus no way to verify them.

BTW, I leaved out x32 on purpose, since musl's support for it is
experimental (right?), and it requires yet another environment type
"muslx32" in LLVM.


Thanks,
Lei


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamic linker name
  2016-06-15  3:06         ` Lei Zhang
@ 2016-06-15  7:10           ` Felix Janda
  2016-06-15  8:16             ` Lei Zhang
  0 siblings, 1 reply; 15+ messages in thread
From: Felix Janda @ 2016-06-15  7:10 UTC (permalink / raw)
  To: musl; +Cc: Khem Raj, Luca Barbato

Lei Zhang wrote:
> 2016-06-14 23:56 GMT+08:00 Lei Zhang <zhanglei.april@gmail.com>:
> > 2016-06-14 23:11 GMT+08:00 Rafael Espíndola <rafael.espindola@gmail.com>:
> >> Sorry, but my understanding is that r272662 is correct for x86, no?
> >>
> >> We can definitely add support for more arches with musl if someone sends a
> >> patch to the list.
> >
> > If no one intends to do this, I can prepare further patches and
> > relevant test cases for other archs.
> 
> Now I'm determining the $ARCH field in musl's dynamic linker name for
> non-x86 archs. After reading these two patches (thanks to their
> authors):
> 
> http://git.alpinelinux.org/cgit/aports/plain/main/clang/clang-0004-Add-musl-targets-and-dynamic-linker.patch
> https://github.com/kraj/meta-clang/blob/master/recipes-devtools/clang/clang/0001-clang-driver-Add-musl-ldso-support.patch

You should really take a look at musl's configure script.

> I got the following list:
> 
> i386
> x86_64
> arm
> armhf
> armeb
> armebhf
> aarch64
> aarch64_be
> mips
> mipsel
> mips64
> mipsel64el // this one looks weird
> powerpc
> powerpc64
> 
> Is this list comprehensive? Is there anything wrong? I have no access
> to non-x86 machines at the moment, thus no way to verify them.

As mentioned by Szabolcs Nagy, the patches are not correct for mips:
It should be "mips64el".

For mips* and powerpc* there are also "-sf" variants. There are also
"mipsr6*" and "mipsn32*" which might or might not be supported by llvm.

> BTW, I leaved out x32 on purpose, since musl's support for it is
> experimental (right?), and it requires yet another environment type
> "muslx32" in LLVM.

x32 support has been in musl for many releases, whereas mips64 has
not landed in a released version of musl, yet...

> 
> Thanks,
> Lei

Thanks for moving forward and getting actually something merged.

Felix


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamic linker name
  2016-06-15  7:10           ` Felix Janda
@ 2016-06-15  8:16             ` Lei Zhang
  2016-06-15  9:31               ` Luca Barbato
  0 siblings, 1 reply; 15+ messages in thread
From: Lei Zhang @ 2016-06-15  8:16 UTC (permalink / raw)
  To: musl, Khem Raj, Luca Barbato

2016-06-15 15:10 GMT+08:00 Felix Janda <felix.janda@posteo.de>:
> Lei Zhang wrote:
>> 2016-06-14 23:56 GMT+08:00 Lei Zhang <zhanglei.april@gmail.com>:
>> > 2016-06-14 23:11 GMT+08:00 Rafael Espíndola <rafael.espindola@gmail.com>:
>> >> Sorry, but my understanding is that r272662 is correct for x86, no?
>> >>
>> >> We can definitely add support for more arches with musl if someone sends a
>> >> patch to the list.
>> >
>> > If no one intends to do this, I can prepare further patches and
>> > relevant test cases for other archs.
>>
>> Now I'm determining the $ARCH field in musl's dynamic linker name for
>> non-x86 archs. After reading these two patches (thanks to their
>> authors):
>>
>> http://git.alpinelinux.org/cgit/aports/plain/main/clang/clang-0004-Add-musl-targets-and-dynamic-linker.patch
>> https://github.com/kraj/meta-clang/blob/master/recipes-devtools/clang/clang/0001-clang-driver-Add-musl-ldso-support.patch
>
> You should really take a look at musl's configure script.

I should've done that. Sorry for my laziness...

> For mips* and powerpc* there are also "-sf" variants. There are also
> "mipsr6*" and "mipsn32*" which might or might not be supported by llvm.

From LLVM's code, it seems these variants aren't supported.

>> BTW, I leaved out x32 on purpose, since musl's support for it is
>> experimental (right?), and it requires yet another environment type
>> "muslx32" in LLVM.
>
> x32 support has been in musl for many releases, whereas mips64 has
> not landed in a released version of musl, yet...

So now I have this list:

i386
x86_64
powerpc
powerpc64
mips
mipsel
mips64
mips64el

which should just work out the box with my previous patch. I'll take
care of x32 and ARM (subarchs and ABIs) with further patches.

Lei


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamic linker name
  2016-06-15  8:16             ` Lei Zhang
@ 2016-06-15  9:31               ` Luca Barbato
  2016-06-15  9:39                 ` Lei Zhang
  0 siblings, 1 reply; 15+ messages in thread
From: Luca Barbato @ 2016-06-15  9:31 UTC (permalink / raw)
  To: Lei Zhang, musl, Khem Raj

On 15/06/16 10:16, Lei Zhang wrote:
> 2016-06-15 15:10 GMT+08:00 Felix Janda <felix.janda@posteo.de>:
>> Lei Zhang wrote:
>>> 2016-06-14 23:56 GMT+08:00 Lei Zhang <zhanglei.april@gmail.com>:
>>>> 2016-06-14 23:11 GMT+08:00 Rafael Espíndola <rafael.espindola@gmail.com>:
>>>>> Sorry, but my understanding is that r272662 is correct for x86, no?
>>>>>
>>>>> We can definitely add support for more arches with musl if someone sends a
>>>>> patch to the list.
>>>>
>>>> If no one intends to do this, I can prepare further patches and
>>>> relevant test cases for other archs.
>>>
>>> Now I'm determining the $ARCH field in musl's dynamic linker name for
>>> non-x86 archs. After reading these two patches (thanks to their
>>> authors):
>>>
>>> http://git.alpinelinux.org/cgit/aports/plain/main/clang/clang-0004-Add-musl-targets-and-dynamic-linker.patch
>>> https://github.com/kraj/meta-clang/blob/master/recipes-devtools/clang/clang/0001-clang-driver-Add-musl-ldso-support.patch
>>
>> You should really take a look at musl's configure script.
> 
> I should've done that. Sorry for my laziness...
> 
>> For mips* and powerpc* there are also "-sf" variants. There are also
>> "mipsr6*" and "mipsn32*" which might or might not be supported by llvm.
> 
> From LLVM's code, it seems these variants aren't supported.
> 
>>> BTW, I leaved out x32 on purpose, since musl's support for it is
>>> experimental (right?), and it requires yet another environment type
>>> "muslx32" in LLVM.
>>
>> x32 support has been in musl for many releases, whereas mips64 has
>> not landed in a released version of musl, yet...
> 
> So now I have this list:
> 
> i386
> x86_64
> powerpc
> powerpc64
> mips
> mipsel
> mips64
> mips64el
> 
> which should just work out the box with my previous patch. I'll take
> care of x32 and ARM (subarchs and ABIs) with further patches.

Powerpc can be little endian as well but it can wait the arm patch as well.

lu


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamic linker name
  2016-06-15  9:31               ` Luca Barbato
@ 2016-06-15  9:39                 ` Lei Zhang
  2016-06-15 13:00                   ` Bobby Bingham
  0 siblings, 1 reply; 15+ messages in thread
From: Lei Zhang @ 2016-06-15  9:39 UTC (permalink / raw)
  To: Luca Barbato; +Cc: musl, Khem Raj

2016-06-15 17:31 GMT+08:00 Luca Barbato <lu_zero@gentoo.org>:
> On 15/06/16 10:16, Lei Zhang wrote:
>> i386
>> x86_64
>> powerpc
>> powerpc64
>> mips
>> mipsel
>> mips64
>> mips64el
>>
>> which should just work out the box with my previous patch. I'll take
>> care of x32 and ARM (subarchs and ABIs) with further patches.
>
> Powerpc can be little endian as well but it can wait the arm patch as well.

I've only seen powerpc64le; don't know if 32-bit powerpc doesn't
support little endian.


Lei


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamic linker name
  2016-06-15  9:39                 ` Lei Zhang
@ 2016-06-15 13:00                   ` Bobby Bingham
  2016-06-15 14:23                     ` Lei Zhang
  2016-06-15 14:54                     ` Khem Raj
  0 siblings, 2 replies; 15+ messages in thread
From: Bobby Bingham @ 2016-06-15 13:00 UTC (permalink / raw)
  To: musl; +Cc: Luca Barbato, Khem Raj

On Wed, Jun 15, 2016 at 05:39:51PM +0800, Lei Zhang wrote:
> 2016-06-15 17:31 GMT+08:00 Luca Barbato <lu_zero@gentoo.org>:
> > On 15/06/16 10:16, Lei Zhang wrote:
> >> i386
> >> x86_64
> >> powerpc
> >> powerpc64
> >> mips
> >> mipsel
> >> mips64
> >> mips64el
> >>
> >> which should just work out the box with my previous patch. I'll take
> >> care of x32 and ARM (subarchs and ABIs) with further patches.
> >
> > Powerpc can be little endian as well but it can wait the arm patch as well.
> 
> I've only seen powerpc64le; don't know if 32-bit powerpc doesn't
> support little endian.

There are a couple things you should know about musl's support for
powerpc64 which mean you probably shouldn't add it.

Two different ABIs exist for powerpc64.  The new one is sometimes called
powerpc64le.  While it's typically used on little endian, there's no
reason it can't be used on big endian systems as well.  Musl only
supports the new ABI, but supports it for both big and little endian.
The arch names used by musl for them are:

powerpc64
powerpc64le

Some software out there assumes that big endian powerpc means the old ABI.
I'm not sure if clang supports big endian powerpc64 with the new ABI or
not, but it needs to if it's to target big endian powerpc64 musl.

The larger problem for both endians is long double support.  The new ABI
calls for a 128-bit long double, either IEEE quad, or IBM double-double.
Musl will not support double-double due to the different floating point
semantics it provides, and gcc's support for IEEE quad is not fully usable
on powerpc64 yet.  Therefore, musl currently uses a 64-bit long double on
powerpc64.

Last I checked, clang only supported using IBM double-double for long
double on powerpc64.  If this is still true, then clang cannot match
musl's ABI on powerpc64.

Bobby


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamic linker name
  2016-06-15 13:00                   ` Bobby Bingham
@ 2016-06-15 14:23                     ` Lei Zhang
  2016-06-15 14:54                     ` Khem Raj
  1 sibling, 0 replies; 15+ messages in thread
From: Lei Zhang @ 2016-06-15 14:23 UTC (permalink / raw)
  To: musl; +Cc: Luca Barbato, Khem Raj

2016-06-15 21:00 GMT+08:00 Bobby Bingham <koorogi@koorogi.info>:
> On Wed, Jun 15, 2016 at 05:39:51PM +0800, Lei Zhang wrote:
>> 2016-06-15 17:31 GMT+08:00 Luca Barbato <lu_zero@gentoo.org>:
>> > On 15/06/16 10:16, Lei Zhang wrote:
>> >> i386
>> >> x86_64
>> >> powerpc
>> >> powerpc64
>> >> mips
>> >> mipsel
>> >> mips64
>> >> mips64el
>> >>
>> >> which should just work out the box with my previous patch. I'll take
>> >> care of x32 and ARM (subarchs and ABIs) with further patches.
>> >
>> > Powerpc can be little endian as well but it can wait the arm patch as well.
>>
>> I've only seen powerpc64le; don't know if 32-bit powerpc doesn't
>> support little endian.
>
> There are a couple things you should know about musl's support for
> powerpc64 which mean you probably shouldn't add it.
>
> Two different ABIs exist for powerpc64.  The new one is sometimes called
> powerpc64le.  While it's typically used on little endian, there's no
> reason it can't be used on big endian systems as well.  Musl only
> supports the new ABI, but supports it for both big and little endian.
> The arch names used by musl for them are:

I just did a quick search; are these two ABIs called "ppc64 elf" and
"ppc64 elf v2" respectively?

> Last I checked, clang only supported using IBM double-double for long
> double on powerpc64.  If this is still true, then clang cannot match
> musl's ABI on powerpc64.

I think powerpc64 needs no special handling anyway (unlike ARM); it
just happens to be supported by the patch. OTOH, do you think I should
*explicitly* disallow clang being configured against musl when
targeting powerpc64? I can put that logic in my next patch if it makes
sense.


Thanks,
Lei


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamic linker name
  2016-06-15 13:00                   ` Bobby Bingham
  2016-06-15 14:23                     ` Lei Zhang
@ 2016-06-15 14:54                     ` Khem Raj
  1 sibling, 0 replies; 15+ messages in thread
From: Khem Raj @ 2016-06-15 14:54 UTC (permalink / raw)
  To: Bobby Bingham; +Cc: musl, Luca Barbato

On Wed, Jun 15, 2016 at 6:00 AM, Bobby Bingham <koorogi@koorogi.info> wrote:
> On Wed, Jun 15, 2016 at 05:39:51PM +0800, Lei Zhang wrote:
>> 2016-06-15 17:31 GMT+08:00 Luca Barbato <lu_zero@gentoo.org>:
>> > On 15/06/16 10:16, Lei Zhang wrote:
>> >> i386
>> >> x86_64
>> >> powerpc
>> >> powerpc64
>> >> mips
>> >> mipsel
>> >> mips64
>> >> mips64el
>> >>
>> >> which should just work out the box with my previous patch. I'll take
>> >> care of x32 and ARM (subarchs and ABIs) with further patches.
>> >
>> > Powerpc can be little endian as well but it can wait the arm patch as well.
>>
>> I've only seen powerpc64le; don't know if 32-bit powerpc doesn't
>> support little endian.
>
> There are a couple things you should know about musl's support for
> powerpc64 which mean you probably shouldn't add it.
>
> Two different ABIs exist for powerpc64.  The new one is sometimes called
> powerpc64le.  While it's typically used on little endian, there's no
> reason it can't be used on big endian systems as well.  Musl only
> supports the new ABI, but supports it for both big and little endian.
> The arch names used by musl for them are:
>
> powerpc64
> powerpc64le
>
> Some software out there assumes that big endian powerpc means the old ABI.
> I'm not sure if clang supports big endian powerpc64 with the new ABI or
> not, but it needs to if it's to target big endian powerpc64 musl.
>
> The larger problem for both endians is long double support.  The new ABI
> calls for a 128-bit long double, either IEEE quad, or IBM double-double.
> Musl will not support double-double due to the different floating point
> semantics it provides, and gcc's support for IEEE quad is not fully usable
> on powerpc64 yet.  Therefore, musl currently uses a 64-bit long double on
> powerpc64.
>
> Last I checked, clang only supported using IBM double-double for long
> double on powerpc64.  If this is still true, then clang cannot match
> musl's ABI on powerpc64.

Thats right. I have fixed it in clang here
https://github.com/kraj/clang/commit/3c3627dbd4358c8e97c95a614e63803cc9048fa6

>
> Bobby


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-06-15 14:54 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-06  1:47 Dynamic linker name Lei Zhang
2016-06-06  2:57 ` Rich Felker
2016-06-14 14:43 ` Khem Raj
2016-06-14 15:04   ` Szabolcs Nagy
2016-06-14 15:09     ` Khem Raj
2016-06-14 15:11     ` Rafael Espíndola
2016-06-14 15:56       ` Lei Zhang
2016-06-15  3:06         ` Lei Zhang
2016-06-15  7:10           ` Felix Janda
2016-06-15  8:16             ` Lei Zhang
2016-06-15  9:31               ` Luca Barbato
2016-06-15  9:39                 ` Lei Zhang
2016-06-15 13:00                   ` Bobby Bingham
2016-06-15 14:23                     ` Lei Zhang
2016-06-15 14:54                     ` Khem Raj

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