Discussion:
From LLVM: I got a note that LLVM plans to remove PPC64's V1 abi
(too old to reply)
Mark Millard
2018-03-28 17:23:22 UTC
Permalink
I'm not one of the better people to be responding to the the likes of
the below. So I've forwarded to some folks better able to comment,
and 2 freebsd lists so others can see the note as well.

sfertile at ca.ibm.com likely does not monitor any FreeBSD lists. So
either direct sends or use of llvm's bug 31716 comments are probably
required for responses.

Begin forwarded message:

> From: bugzilla-***@llvm.org
> Subject: [Bug 31716] FreeBSD's 3.9.1 lld: Powerpc64: code in .plt expects function descriptor layout but .got.plt space it uses does not have such
> Date: March 28, 2018 at 10:00:01 AM PDT
> To: marklmi26-fbsd at yahoo.com
>
> ***@ca.ibm.com changed bug 31716
> What Removed Added
> CC sfertile at ca.ibm.com
>
> Comment # 2 on bug 31716 from sfertile at ca.ibm.com
> Hi Mark,
>
> I'm one of a few people now actively working on adding support for the PPC64 V2
> abi.Our plan was to explicitly remove support for the V1 abi (at least until
> someone makes a pointed effort to support it). I'm interested in hearing what
> support FreeBSD has for ppc64 right now. Is there any support for the
> little-endian/V2 abi?
>
>
> You are receiving this mail because:
> • You reported the bug.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
Nathan Whitehorn
2018-03-28 18:38:15 UTC
Permalink
Is this big-endian support or V1 support being removed? We support the
V2 ABI fully on FreeBSD, but not (yet) little-endian. Like on Linux, the
default ABI on big-endian will likely remain V1 for the indefinite
future, however, and it would be good if it were at least simple to
re-add support at some later date.
-Nathan

On 03/28/18 11:22, Sean Fertile wrote:
> Hi Mark,
> Just so we are clear this is about V1 abi support in lld, not in llvm.
> The compiler will still be able to produce valid code for big-endian
> ppc64.
> Regards
> Sean
>
> ----- Original message -----
> From: Mark Millard <marklmi26-***@yahoo.com>
> To: Nathan Whitehorn <***@freebsd.org>, Justin Hibbits
> <***@gmail.com>, Ed Maste <***@freebsd.org>
> Cc: freebsd-***@freebsd.org, FreeBSD Current
> <freebsd-***@freebsd.org>, ***@ca.ibm.com
> Subject: From LLVM: I got a note that LLVM plans to remove PPC64's
> V1 abi support; I'm asked about what support there is for the
> PPC64 little-endian/V2 abi (see forwarded message)
> Date: Wed, Mar 28, 2018 1:23 PM
> I'm not one of the better people to be responding to the the likes of
> the below. So I've forwarded to some folks better able to comment,
> and 2 freebsd lists so others can see the note as well.
>
> sfertile at ca.ibm.com likely does not monitor any FreeBSD lists. So
> either direct sends or use of llvm's bug 31716 comments are probably
> required for responses.
>
> Begin forwarded message:
>
> > From: bugzilla-***@llvm.org
> > Subject: [Bug 31716] FreeBSD's 3.9.1 lld: Powerpc64: code in
> .plt expects function descriptor layout but .got.plt space it uses
> does not have such
> > Date: March 28, 2018 at 10:00:01 AM PDT
> > To: marklmi26-fbsd at yahoo.com
> >
> > ***@ca.ibm.com changed bug 31716
> > What Removed Added
> > CC sfertile at ca.ibm.com
> >
> > Comment # 2 on bug 31716 from sfertile at ca.ibm.com
> > Hi Mark,
> >
> > I'm one of a few people now actively working on adding support
> for the PPC64 V2
> > abi.Our plan was to explicitly remove support for the V1 abi (at
> least until
> > someone makes a pointed effort to support it). I'm interested in
> hearing what
> > support FreeBSD has for ppc64 right now. Is there any support
> for the
> > little-endian/V2 abi?
> >
> >
> > You are receiving this mail because:
> > • You reported the bug.
>
> ===
> Mark Millard
> marklmi at yahoo.com
> ( dsl-only.net went
> away in early 2018-Mar)
>
>
A. Wilcox
2018-03-28 20:17:54 UTC
Permalink
On 03/28/18 13:38, Nathan Whitehorn wrote:
> Is this big-endian support or V1 support being removed? We support
> the V2 ABI fully on FreeBSD, but not (yet) little-endian. Like on
> Linux, the default ABI on big-endian will likely remain V1 for the
> indefinite future,

This is an important distinction to make (big-endian != ELFv1, and ELFv1
!= big-endian).

But do note that on Linux, the musl libc (in use by distros like Alpine,
Adélie, postmarketOS) only supports ELFv2, even in big-endian mode. And
as the maintainer of Adélie using it as a daily-driver on an iMac G5,
it's definitely something you can use (the only breakage I've seen so
far on Linux is the PCRE JIT ignoring __CALL_ELF and inserting function
descriptors anyway).

So I wouldn't discount moving to ELFv2 ABI on BE if that is necessary to
keep LLVM happy. It'd be some effort but it should work.

If this is really something FreeBSD is interested in, you might even
manage to convince me to put on my ports hat again, to help get the JIT
patches in that are needed for upstreams that went comatose.


Best,
--arw


> however, and it would be good if it were at least simple to re-add
> support at some later date. -Nathan
>

--
A. Wilcox (awilfox)
Open-source programmer (C, C++, Python)
https://code.foxkit.us/u/awilfox/
Justin Hibbits
2018-03-28 20:34:00 UTC
Permalink
On Wed, Mar 28, 2018 at 3:17 PM, A. Wilcox <***@wilcox-tech.com> wrote:
> On 03/28/18 13:38, Nathan Whitehorn wrote:
>> Is this big-endian support or V1 support being removed? We support
>> the V2 ABI fully on FreeBSD, but not (yet) little-endian. Like on
>> Linux, the default ABI on big-endian will likely remain V1 for the
>> indefinite future,
>
> This is an important distinction to make (big-endian != ELFv1, and ELFv1
> != big-endian).
>
> But do note that on Linux, the musl libc (in use by distros like Alpine,
> Adélie, postmarketOS) only supports ELFv2, even in big-endian mode. And
> as the maintainer of Adélie using it as a daily-driver on an iMac G5,
> it's definitely something you can use (the only breakage I've seen so
> far on Linux is the PCRE JIT ignoring __CALL_ELF and inserting function
> descriptors anyway).
>
> So I wouldn't discount moving to ELFv2 ABI on BE if that is necessary to
> keep LLVM happy. It'd be some effort but it should work.
>
> If this is really something FreeBSD is interested in, you might even
> manage to convince me to put on my ports hat again, to help get the JIT
> patches in that are needed for upstreams that went comatose.
>
>
> Best,
> --arw
>
>
>> however, and it would be good if it were at least simple to re-add
>> support at some later date. -Nathan
>>
>
> --
> A. Wilcox (awilfox)
> Open-source programmer (C, C++, Python)
> https://code.foxkit.us/u/awilfox/
>

Moving to ELFv2 is predicated on having a complete toolchain
supporting it. Right now, base gcc+binutils only supports ELFv1, and
we cannot upgrade to newer toolchain yet.

- Justin
Sean Fertile
2018-03-28 18:22:39 UTC
Permalink
_______________________________________________
freebsd-***@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-***@freebsd.org"
Mark Millard
2018-03-28 22:36:35 UTC
Permalink
Sean Fertile's messages are showing up empty on the list.
So I'm just forwarding the two that I've gotten to the lists
(and not the individuals). I think they stand fairly well on
their own, so no other message history is included.

On 2018-Mar-28, at 3:08 PM, Sean Fertile <sfertile at ca.ibm.com> wrote:

> This is specifically the V1 abi support in the 64-bit PowerPC target in lld. I'm definitely guilty of conflating big-endian with V1-abi and little-endian with V2-abi. I wasn't aware of people using the V2 abi on big-endian machines. We can make sure to test big-endian in lit tests as we deliver support for the V2 abi, but its unlikely I'll be able to run big-endian programs on actual hardware . I agree that we should keep it simple to add back the V1 abi support.
>
> Sean

On 03/28/18 11:22, Sean Fertile wrote:
> Hi Mark,
>
> Just so we are clear this is about V1 abi support in lld, not in llvm. The compiler will still be able to produce valid code for big-endian ppc64.
>
> Regards
> Sean



===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
Sean Fertile
2018-03-28 22:08:20 UTC
Permalink
_______________________________________________
freebsd-***@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-***@freebsd.org"
Loading...