Skip to content
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

cpufeatures: fix Linux/aarch64 support #398

Merged
merged 1 commit into from May 6, 2021

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented May 6, 2021

The __detect_target_features macro was expanding into code that directly referenced libc::getauxval.

This commit adds a small helper function for querying AT_HWCAP using getauxval similar to the sysctlbyname helper function used on MacOS, and then has the macro invoke it using $crate::.

The `__detect_target_features` macro was expanding into code that
directly referenced `libc::getauxval`.

This commit adds a small helper function for querying `AT_HWCAP` using
`getauxval` similar to the `sysctlbyname` helper function used on MacOS,
and then has the macro invoke it using `$crate::`.
@tarcieri tarcieri merged commit d3210e8 into master May 6, 2021
@tarcieri tarcieri deleted the cpufeatures/fix-linux-aarch64 branch May 6, 2021 19:34
tarcieri added a commit that referenced this pull request May 6, 2021
As in #398, the `libc` symbol is still being emitted from a macro, in
this case to reference the individual hwcaps.

This commit re-exports them all from the `cpufeatures::aarch64` module
and has the macro reference them that way.
tarcieri added a commit that referenced this pull request May 6, 2021
As in #398, the `libc` symbol is still being emitted from a macro, in
this case to reference the individual hwcaps.

This commit re-exports them all from the `cpufeatures::aarch64` module
and has the macro reference them that way.
tarcieri added a commit that referenced this pull request May 6, 2021
As in #398, the `libc` symbol is still being emitted from a macro, in
this case to reference the individual hwcaps.

This commit re-exports them all from the `cpufeatures::aarch64` module
and has the macro reference them that way.
tarcieri added a commit that referenced this pull request May 6, 2021
As in #398, the `libc` symbol is still being emitted from a macro, in
this case to reference the individual hwcaps.

This commit re-exports them all from the `cpufeatures::aarch64` module
and has the macro reference them that way.
tarcieri added a commit that referenced this pull request May 6, 2021
As in #398, the `libc` symbol is still being emitted from a macro, in
this case to reference the individual hwcaps.

This commit re-exports them all from the `cpufeatures::aarch64` module
and has the macro reference them that way.
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.

None yet

1 participant