projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc6b86e
)
[compiler-rt][builtins] Define AT_HWCAP2 for AArch64
author
Xi Ruoyao
<xry111@xry111.site>
Wed, 8 Mar 2023 15:26:57 +0000
(16:26 +0100)
committer
Nikita Popov
<nikita.ppv@gmail.com>
Wed, 8 Mar 2023 15:26:57 +0000
(16:26 +0100)
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
compiler-rt/lib/builtins/cpu_model.c
patch
|
blob
|
history
diff --git
a/compiler-rt/lib/builtins/cpu_model.c
b/compiler-rt/lib/builtins/cpu_model.c
index
4e3ce7a
..
01bab46
100644
(file)
--- 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