-
Notifications
You must be signed in to change notification settings - Fork 136
cpu_ppc64le.c: fix build on FreeBSD #2520
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
@@ -69,7 +69,11 @@ extern uint8_t OPENSSL_cpucap_initialized; | |||
|
|||
void OPENSSL_cpuid_setup(void) { | |||
#if defined(AT_HWCAP2) | |||
#if defined(__linux__) |
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.
Please use OPENSSL_<OS>
from https://github.com/aws/aws-lc/blob/main/include/openssl/target.h
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2520 +/- ##
==========================================
+ Coverage 78.88% 78.90% +0.01%
==========================================
Files 640 640
Lines 109755 109766 +11
Branches 15523 15526 +3
==========================================
+ Hits 86580 86608 +28
+ Misses 22478 22463 -15
+ Partials 697 695 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
FreeBSD uses elf_aux_info() function instead of getauxval(): In file included from /wrkdirs/usr/ports/security/rustls-ffi/work/rustls-ffi-0.15.0/cargo-crates/aws-lc-sys-0.24.0/aws-lc/crypto/fipsmodule/bcm.c:86: /wrkdirs/usr/ports/security/rustls-ffi/work/rustls-ffi-0.15.0/cargo-crates/aws-lc-sys-0.24.0/aws-lc/crypto/fipsmodule/cpucap/cpu_ppc64le.c:72:28: error: call to undeclared function 'getauxval'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 72 | OPENSSL_ppc64le_hwcap2 = getauxval(AT_HWCAP2); | ^
Can you confirm that this patch works for your build environment? |
FreeBSD uses elf_aux_info() function instead of getauxval():
Description of changes:
Currently aws-lc doesn't build on FreeBSD/powerpc64* because of using getauxval(). This PR addresses the issue.
Testing:
Try building on FreeBSD 14.3-RELEASE on powerpc64le and powerpc64.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.