Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AT_HWCAP2 not always defined (#1682)
### Issues: Addresses: aws/aws-lc-rs#427 ### Description of changes: * Allow fallback when `AT_HWCAP2` is not defined (for older glibc). > > AT_HWCAP2 (since glibc 2.18) > Further machine-dependent hints about processor > capabilities. > ### Testing: * I've not yet been able to setup an environment that replicates [the failure seen downstream](https://github.com/rust-lang/rustup/actions/runs/9720503984/job/26831972336?pr=3898) for `arm-unknown-linux-gnueabihf`: ``` In file included from /cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.18.0/aws-lc/crypto/fipsmodule/bcm.c:81: /cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.18.0/aws-lc/crypto/fipsmodule/cpucap/cpu_arm_linux.c: In function 'aws_lc_0_18_0_OPENSSL_cpuid_setup': /cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.18.0/aws-lc/crypto/fipsmodule/cpucap/cpu_arm_linux.c:121:38: error: 'AT_HWCAP2' undeclared (first use in this function); did you mean 'AT_HWCAP'? unsigned long hwcap2 = getauxval(AT_HWCAP2); ^~~~~~~~~ AT_HWCAP /cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.18.0/aws-lc/crypto/fipsmodule/cpucap/cpu_arm_linux.c:121:38: note: each undeclared identifier is reported only once for each function it appears in /cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.18.0/aws-lc/crypto/fipsmodule/bcm.c: At top level: cc1: error: unrecognized command line option '-Wno-c11-extensions' [-Werror] cc1: all warnings being treated as errors ninja: build stopped: subcommand failed. ``` 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.
- Loading branch information