[PATCH v2 3/3] powerpc64le: Add glibc-hwcaps support

Florian Weimer fweimer@redhat.com
Thu Nov 5 11:40:29 GMT 2020


* Segher Boessenkool:

> On Wed, Nov 04, 2020 at 08:56:05PM +0100, Florian Weimer wrote:
>> * Segher Boessenkool:
>> 
>> >> > -mcpu=power10 enables MMA.  If you do not want all Power10 features, you
>> >> > should not use -mcpu=power10.  It is that simple.
>> >> 
>> >> Then we need a different name, or require MMA for the "power10"
>> >> glibc-hwcaps subdirectory.
>> >
>> > Or do nothing.  Glibc doesn't use any MMA code, does it?  This is never
>> > generated automatically, you need to really ask for it in your source
>> > code.
>> 
>> glibc's internal use does not matter in this context.  Programmers must
>> be able to drop their own libraries built with -mcpu=power10 into the
>> power10 subdirectory.  If GCC turns on MMA by default for this switch
>> and glibc selects the power10 subdirectory without checking for MMA
>> support, then this isn't guaranteed to work.
>
> Are you saying that it is *normal* for people to put very different code
> into libc like this?  Wow.
>
>> We have been through this with x86-64 already.  I don't want to produce
>> the same bug.
>
> No code in libc should ever use MMA, imnsho.

Oh, I see now.  I think we don't agree about the scope of the
glibc-hwcaps feature.

It's going to be used to ELF multilibs in general, not just glibc
components.  So a BLAS implementation could use it and drop its
implementation DSOs into the appropriate directories.

That's why vector features such as MMA matter in this context.

Given this additional context, I hope we can agree that a rule for
programmers like “build with -mcpu=power10 for the power10 glibc-hwcaps
subdirectory“ has a lot of value.

Thanks,
Florian
-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill



More information about the Libc-alpha mailing list