Skip to content

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

Merged
merged 4 commits into from
Feb 28, 2020

Conversation

linkmauve
Copy link
Contributor

Also move getauxval() where it should be.

@rust-highfive
Copy link

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.

@linkmauve
Copy link
Contributor Author

Hi, I can’t make sense of the CI failure, it also fails on platforms which have obviously not been touched at all.

@bors
Copy link
Contributor

bors commented Feb 20, 2020

☔ The latest upstream changes (presumably #1639) made this pull request unmergeable. Please resolve the merge conflicts.

@linkmauve
Copy link
Contributor Author

This is now up to date again.

@JohnTitor
Copy link
Member

Thanks! I'll review later. r? @JohnTitor

@rust-highfive rust-highfive assigned JohnTitor and unassigned gnzlbg Feb 20, 2020
@linkmauve linkmauve force-pushed the getauxval branch 2 times, most recently from 9a78d31 to 58b3973 Compare February 20, 2020 23:33
@linkmauve
Copy link
Contributor Author

@JohnTitor
Copy link
Member

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 :/

@linkmauve
Copy link
Contributor Author

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).

@JohnTitor
Copy link
Member

Just merged #1669, can you rebase again to check if it resolves CI failure?

@linkmauve
Copy link
Contributor Author

linkmauve commented Feb 26, 2020

@JohnTitor
Copy link
Member

JohnTitor commented Feb 26, 2020

Hm, I just dove into glibc source but I couldn't find HWCAP2_* consts.

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).

Yeah, I'm fine with that if you want :) And it'd be great if you could also leave a FIXME comment.

@linkmauve
Copy link
Contributor Author

linkmauve commented Feb 26, 2020

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 /usr/include/asm/hwcap.h.

@JohnTitor
Copy link
Member

Yeah, I know, just explained why CI had a failure.
If you want to go ahead, you should make CI green by commenting out them for now, skipping the test, or adding a tweak for CI. You said you don't need them right now so I commented as above.

They are missing in the CI’s linux-api-headers, and not widely available
yet either.
@linkmauve
Copy link
Contributor Author

There, should now be fine and mergeable!

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@JohnTitor JohnTitor merged commit e15be47 into rust-lang:master Feb 28, 2020
@bors bors mentioned this pull request Feb 28, 2020
@linkmauve linkmauve deleted the getauxval branch March 12, 2020 15:07
linkmauve added a commit to linkmauve/hashes that referenced this pull request May 6, 2020
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.
bors added a commit that referenced this pull request May 13, 2021
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)?
bors added a commit that referenced this pull request May 14, 2021
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)?
bors added a commit that referenced this pull request May 14, 2021
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)?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants