Detect hard-float support on aarch64 kernels running armv7 userspace#18530
Merged
Detect hard-float support on aarch64 kernels running armv7 userspace#18530
Conversation
When an armv7 binary runs on an aarch64 kernel (e.g., armv7l containers on aarch64 hosts, or 32-bit Raspberry Pi OS on 64-bit hardware), /proc/cpuinfo reports AArch64-style feature flags instead of ARM-32 flags. The existing check for "vfp" fails because AArch64 uses "fp" instead. Add detection of the AArch64 "fp" feature flag (mandatory on all AArch64 CPUs) as a discrete token, indicating hardware floating-point support. This ensures uv selects the gnueabihf (hard-float) Python variant instead of the gnueabi (soft-float) variant. Closes #18509
zanieb
commented
Mar 17, 2026
Comment on lines
+52
to
+55
| #[cfg(test)] | ||
| mod tests { | ||
| #[cfg(target_os = "linux")] | ||
| use super::has_hardware_float_features; |
Member
Author
There was a problem hiding this comment.
I could certainly be convinced to just drop these tests
zanieb
added a commit
that referenced
this pull request
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pulled out of #18517
I don't have aarch64 hardware available locally, but Claude posited:
I reproduced this in #18532
Under QEMU on aarch64 macOS, both the
vfpandfpfeature flags are set.Closes #18509