This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[OBV][PATCH] gdbserver: Ensure AT_HWCAP2 is defined
- From: Alan Hayward <Alan dot Hayward at arm dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Cc: nd <nd at arm dot com>, Alan Hayward <Alan dot Hayward at arm dot com>
- Date: Thu, 28 Mar 2019 11:43:45 +0000
- Subject: [OBV][PATCH] gdbserver: Ensure AT_HWCAP2 is defined
When using older compilers, AT_HWCAP2 may not be be defined.
It is defined in elf/common.h, however including this in
gdbserver/linux-low.c causes conflicts.
Manually add the define if it does not exist.
gdb/gdbserver/ChangeLog:
2019-03-28 Alan Hayward <alan.hayward@arm.com>
* linux-low.c (AT_HWCAP2): Add define if not already included.
---
gdb/gdbserver/linux-low.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 7158a6798c..265043f97e 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -75,6 +75,10 @@
#define O_LARGEFILE 0
#endif
+#ifndef AT_HWCAP2
+#define AT_HWCAP2 26
+#endif
+
/* Some targets did not define these ptrace constants from the start,
so gdbserver defines them locally here. In the future, these may
be removed after they are added to asm/ptrace.h. */
--
2.20.1 (Apple Git-117)