-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add getauxval for Android #1987
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
Labels
C-API-request
Category: API request
Comments
Hey, thanks for the issue!
It's totally okay to add it for these two targets. |
bors
added a commit
that referenced
this issue
Dec 8, 2020
…id, r=JohnTitor Add getauxval for 64-bit Android Fixes #1987 This adds `getauxval` declaration on all 64-bit Android targets. This function was not declared in Bionic until API level 18. 64-bit support was added to Android in 5.0 (API level 21) thus all 64-bit targets (including AFAICT MIPS64 though I am not able to confirm this) should have `getauxval` declared. The `AT_` constants should be the same on all platforms.
bors
added a commit
that referenced
this issue
Dec 8, 2020
…id, r=JohnTitor Add getauxval for 64-bit Android Fixes #1987 This adds `getauxval` declaration on all 64-bit Android targets. This function was not declared in Bionic until API level 18. 64-bit support was added to Android in 5.0 (API level 21) thus all 64-bit targets (including AFAICT MIPS64 though I am not able to confirm this) should have `getauxval` declared. The `AT_` constants should be the same on all platforms.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
getauxval
is useful for detecting CPU specific features such as availability of the ARMv8 AES instructions.Currently in this crate,
getauxval
is available on Linux but not on Android. This function was added to Android in API Level 18 (https://developer.android.com/ndk/guides/cpu-features). So it might be a problem for someone building to an older API level. However onaarch64
andx86_64
the earliest API Level is 21 and thus for these architecturesgetauxval
is always available.Happy to contribute a patch, just wanted to check if enabling
getauxval
only foraarch64-linux-android
andx86_64-linux-android
was ok or if you had suggestions on how to handle the possibility of it not being included when built for an old Android.The text was updated successfully, but these errors were encountered: