-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add missing AArch64 HWCAP_* and HWCAP2_* consts #1638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @gnzlbg (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Hi, I can’t make sense of the CI failure, it also fails on platforms which have obviously not been touched at all. |
☔ The latest upstream changes (presumably #1639) made this pull request unmergeable. Please resolve the merge conflicts. |
This is now up to date again. |
Thanks! I'll review later. r? @JohnTitor |
9a78d31
to
58b3973
Compare
The failure happens to be here, but I can’t figure out where this main.c is generated: |
The problem is CI uses glibc 2.29 and it doesn't have newer consts, I guess. I've attempted to update CI images but encountered a roadblock :/ |
I could comment out the too new consts for the time being? I originally only needed the SHA-1 and SHA-256 extensions (for RustCrypto/hashes#97). |
Just merged #1669, can you rebase again to check if it resolves CI failure? |
It still failed. :/ With fewer missing constants though: |
Hm, I just dove into glibc source but I couldn't find HWCAP2_* consts.
Yeah, I'm fine with that if you want :) And it'd be great if you could also leave a FIXME comment. |
On my system, it isn’t provided by glibc but by linux-api-headers: https://archlinuxarm.org/packages/aarch64/linux-api-headers In this package, you can see them being defined in |
Yeah, I know, just explained why CI had a failure. |
They are missing in the CI’s linux-api-headers, and not widely available yet either.
There, should now be fine and mergeable! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Now that rust-lang/libc#1638 got merged and a new libc release got made, we can use them instead of hardcoding their values. This bumps the libc dependency to the earliest version with these consts.
musl: add missing AArch64 HWCAP_* consts Closes #2171. I effectively just copied and pasted these from #1638 after confirming that they are identical to musl's [aarch64/bits/hwcap.h](https://github.com/bminor/musl/blob/4433115/arch/aarch64/bits/hwcap.h) and that musl's `getauxval()` also takes a `c_ulong`. It seems like if these are added it would address some of [`TODO-linux.txt`](https://github.com/rust-lang/libc/blob/ed1399a/libc-test/semver/TODO-linux.txt)?
musl: add missing AArch64 HWCAP_* consts Closes #2171. I effectively just copied and pasted these from #1638 after confirming that they are identical to musl's [aarch64/bits/hwcap.h](https://github.com/bminor/musl/blob/4433115/arch/aarch64/bits/hwcap.h) and that musl's `getauxval()` also takes a `c_ulong`. It seems like if these are added it would address some of [`TODO-linux.txt`](https://github.com/rust-lang/libc/blob/ed1399a/libc-test/semver/TODO-linux.txt)?
musl: add missing AArch64 HWCAP_* consts Closes #2171. I effectively just copied and pasted these from #1638 after confirming that they are identical to musl's [aarch64/bits/hwcap.h](https://github.com/bminor/musl/blob/4433115/arch/aarch64/bits/hwcap.h) and that musl's `getauxval()` also takes a `c_ulong`. It seems like if these are added it would address some of [`TODO-linux.txt`](https://github.com/rust-lang/libc/blob/ed1399a/libc-test/semver/TODO-linux.txt)?
Also move
getauxval()
where it should be.