[Rpm-maint] [rpm-software-management/rpm] RFE: Utilize hwcaps mechnism for arch detection (+ more) (Issue #2318)

Panu Matilainen notifications at github.com
Fri Dec 9 10:37:51 UTC 2022


It's absurd that rpm has all manner of assembler magic to perform cpu detection. Rpm is not interested in the cpu bits and flags and their weird names at all, the only really relevant thing is somehow mapping toolchain optimizations to packages, and their compatibility with whatever is we're currently running on.

Toolchains + libc's have their own mechanism for this: hwcaps. We can outsource the cpu capability detection to libc by pushing the rpm `uname -p` counterpart to a dynamically loaded library and let the libc load the right one for us. At the minimum, it just needs a function to return the processor name, but there are almost certainly all manner of other opportunities in this direction. 

Some potential uses could be
- eliminate/isolate cruft rpmrc.c
- dynamic rpmlib() (or similar) provides
- support adding new/custom architectures without having to touch rpm code

Inspired by discussion in #2315

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2318
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/2318 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20221209/f08793da/attachment.html>


More information about the Rpm-maint mailing list