[Rpm-maint] [rpm-software-management/rpm] RFC: Add x86-64 architecture levels (v2-v4) as architectures (PR #2315)
Fabian Vogt
notifications at github.com
Thu Dec 8 12:04:13 UTC 2022
The x86_64 SysV psABI defines four levels of x86_64 with certain CPU features required for each level. Those definitions are meant to be generically useful and recognized as such by glibc and gcc as well.
For backward-compatibility and to avoid surprises, default to building x86_64 even on v2+ capable machines.
Tested by running `rpm --eval %_target_cpu` and using `rpmbuild` with various `BuildArch` values on a `x86_64_v3` host.
This should be less controverisal than adding CPU model specific architectures such as `znver1` (https://github.com/rpm-software-management/rpm/pull/1035).
There might be one slight issue: The psABI document defines x86-64-v3 as
x86-64-v2 + AVX + AVX2 + F16C + FMA + LZCNT + MOVBE + BMI + BMI2 + OSXSAVE, but glibc's hwcaps code only looks at
x86-64-v2 + AVX + AVX2 + F16C + FMA + LZCNT + MOVBE (no BMI, BMI2 or OSXSAVE). Not sure whether that's a bug or for some reason intentional. gcc uses the psABI definition, so code built with `-march=x86-64-v3` is not compatible with `%_libdir/glibc-hwcaps/x86-64-v3/`...
CC @Conan-Kudo @dirkmueller @DimStar77 @mlschroe
You can view, comment on, or merge this pull request online at:
https://github.com/rpm-software-management/rpm/pull/2315
-- Commit Summary --
* Add x86-64 architecture levels (v2-v4) as architectures
-- File Changes --
M lib/rpmrc.c (75)
M rpmrc.in (18)
-- Patch Links --
https://github.com/rpm-software-management/rpm/pull/2315.patch
https://github.com/rpm-software-management/rpm/pull/2315.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2315
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/2315 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20221208/0c353787/attachment-0001.html>
More information about the Rpm-maint
mailing list