Skip to content

Commit e0044a6

Browse files
xry111tstellar
authored andcommitted
[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 23fcca8)
1 parent 7fd255f commit e0044a6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler-rt/lib/builtins/cpu_model.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,9 @@ int CONSTRUCTOR_ATTRIBUTE __cpu_indicator_init(void) {
924924
#define HWCAP_SB (1 << 29)
925925
#endif
926926

927+
#ifndef AT_HWCAP2
928+
#define AT_HWCAP2 26
929+
#endif
927930
#ifndef HWCAP2_DCPODP
928931
#define HWCAP2_DCPODP (1 << 0)
929932
#endif

0 commit comments

Comments
 (0)