Make the HWCAP/HWCAP2 constants available from <sys/auxv.h>.
Noticed by ARM when adding BTI support to the linker.
Test: treehugger
Change-Id: If3b87d0bd4682ff478b7805251fc9a88a7f439f9
diff --git a/libc/include/bits/auxvec.h b/libc/include/bits/auxvec.h
index 4d39477..2d6522a 100644
--- a/libc/include/bits/auxvec.h
+++ b/libc/include/bits/auxvec.h
@@ -37,6 +37,14 @@
#include <linux/auxvec.h>
+// AT_HWCAP isn't useful without these constants.
+#if __has_include(<asm/hwcap.h>)
+#include <asm/hwcap.h>
+#endif
+#if __has_include(<asm/hwcap2.h>)
+#include <asm/hwcap2.h>
+#endif
+
/** Historical SuperH cruft. Irrelevant on Android. */
#define AT_FPUCW 18
/** Historical PowerPC cruft. Irrelevant on Android. */