public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* riscv64: ld.so hardware capabilities / V extension 1.0
@ 2022-08-09  8:42 Mathieu Malaterre
  2022-08-09 10:32 ` Florian Weimer
  0 siblings, 1 reply; 2+ messages in thread
From: Mathieu Malaterre @ 2022-08-09  8:42 UTC (permalink / raw)
  To: libc-help

Dear ld.so maintainers,

I see that from time to time subdirectories are added to the search
path of ld.so. For example I see that commit 45ff34638f0 added the
sub-directory `avx512_1`.

I tried to make sense of the (outdated?) documentation from:

* https://man7.org/linux/man-pages/man8/ld.so.8.html

but I failed to understand when new subdirectories are being added to ld.so ?

In my own very selfish interest I would like to request a new search
subdirectory for riscv64 with V-extensions. (-march=rv64gcv1p0), so I
would like to hear about this process.

Thanks,

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

* Re: riscv64: ld.so hardware capabilities / V extension 1.0
  2022-08-09  8:42 riscv64: ld.so hardware capabilities / V extension 1.0 Mathieu Malaterre
@ 2022-08-09 10:32 ` Florian Weimer
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Weimer @ 2022-08-09 10:32 UTC (permalink / raw)
  To: Mathieu Malaterre; +Cc: libc-help

* Mathieu Malaterre:

> Dear ld.so maintainers,
>
> I see that from time to time subdirectories are added to the search
> path of ld.so. For example I see that commit 45ff34638f0 added the
> sub-directory `avx512_1`.
>
> I tried to make sense of the (outdated?) documentation from:
>
> * https://man7.org/linux/man-pages/man8/ld.so.8.html
>
> but I failed to understand when new subdirectories are being added to ld.so ?

The old mechanism with AT_PLATFORM did not work.  The new mechanism is
glibc-hwcaps, where capabilities are ordered, ideally with each
capability being a superset of the previous one.  You only need to
supply one file, dl-hwcaps-subdirs.c, that defines _dl_hwcaps_subdirs
and _dl_hwcaps_subdirs_active.  This commit provides an example of how
to do this:

commit fdf8fbca455ca3ef57235bde907bcc6a624ac5aa
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Dec 10 13:51:18 2020 +0100

    s390x: Add glibc-hwcaps support
    
    Subdirectories z13, z14, z15 can be selected, mostly based on the
    level of support for vector instructions.
    
    Co-Authored-By: Stefan Liebler <stli@linux.ibm.com>

Ideally, you add similar tests to what's included in that commit.

I'd also strongly recommend to document the glibc-hwcaps levels in the
psABI supplement because they need to be consistent across toolchain
components.

If you want to generate nice diagnostics when glibc itself is built with
a higher ISA level, you'll have to add your own dl-hwcap-check.h

Thanks,
Florian


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

end of thread, other threads:[~2022-08-09 10:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-09  8:42 riscv64: ld.so hardware capabilities / V extension 1.0 Mathieu Malaterre
2022-08-09 10:32 ` Florian Weimer

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 read-only IMAP folder(s) and NNTP newsgroup(s).