Skip to content

musl: HWCAP_* consts missing on aarch64 targets #2171

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

Closed
tarcieri opened this issue May 12, 2021 · 0 comments · Fixed by #2172
Closed

musl: HWCAP_* consts missing on aarch64 targets #2171

tarcieri opened this issue May 12, 2021 · 0 comments · Fixed by #2172
Labels
C-API-request Category: API request

Comments

@tarcieri
Copy link
Contributor

tarcieri commented May 12, 2021

It looks like #1638 added these constants, but for glibc only. #2109 added a TODO-linux.txt which made a note of this.

I just received an in-the-wild report about this (RustCrypto/hashes#273) and noticed there wasn't a specific tracking issue for it, so I thought I'd open one.

At first glance it seems like this could be resolved by a PR similar to #1638, but adding the constants to linux/musl/b64/aarch64/mod.rs.

Is that the case? If so, I could try to open a PR to add these constants. Edit: opened #2172.

@tarcieri tarcieri added the C-API-request Category: API request label May 12, 2021
tarcieri added a commit to RustCrypto/utils that referenced this issue May 13, 2021
The `libc` crate doesn't presently define Linux's `HWCAP_*` in
Musl-based environments:

rust-lang/libc#2171

This PR (temporarily) copies the presently supported `HWCAP_*` constants
directly into this crate.

Additionally, it adds support for the `neon` target feature.
tarcieri added a commit to RustCrypto/utils that referenced this issue May 13, 2021
The `libc` crate doesn't presently define Linux's `HWCAP_*` in
Musl-based environments:

rust-lang/libc#2171

This PR (temporarily) copies the presently supported `HWCAP_*` constants
directly into this crate.

Additionally, it adds support for the `neon` target feature.
bors added a commit that referenced this issue 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 issue 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 bors closed this as completed in ae698a1 May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-API-request Category: API request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant