diff options
author | Xi Ruoyao <xry111@xry111.site> | 2023-03-08 16:26:57 +0100 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2023-03-09 06:53:51 -0800 |
commit | e0044a6993d4c68310f7ce9e2edaaf73fdb4b056 (patch) | |
tree | e3e7e5531bad0f9d2d2aa647af9c65c0a4c1371c | |
parent | 7fd255fe6e3551c06e9d233517576e95c9a912fe (diff) | |
download | llvm-e0044a6993d4c68310f7ce9e2edaaf73fdb4b056.tar.gz |
[compiler-rt][builtins] Define AT_HWCAP2 for AArch64
Without the definition, build fails on AArch64 with
> error: 'AT_HWCAP2' undeclared (first use in this function);
> did you mean 'AT_HWCAP'?
with old Glibc versions.
Differential Revision: https://reviews.llvm.org/D145494
(cherry picked from commit 23fcca822a3a3b9a14b6a1ad432814e2634cdb63)
-rw-r--r-- | compiler-rt/lib/builtins/cpu_model.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler-rt/lib/builtins/cpu_model.c b/compiler-rt/lib/builtins/cpu_model.c index c5d7ae31afce..f5ad530c7e88 100644 --- a/compiler-rt/lib/builtins/cpu_model.c +++ b/compiler-rt/lib/builtins/cpu_model.c @@ -924,6 +924,9 @@ int CONSTRUCTOR_ATTRIBUTE __cpu_indicator_init(void) { #define HWCAP_SB (1 << 29) #endif +#ifndef AT_HWCAP2 +#define AT_HWCAP2 26 +#endif #ifndef HWCAP2_DCPODP #define HWCAP2_DCPODP (1 << 0) #endif |