This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] IPA: Fix build problem on !HAVE_GETAUXVAL
- From: Marcin at sourceware dot org, Koś at sourceware dot org;cielnicki <mwk at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 3 Apr 2016 16:28:09 -0000
- Subject: [binutils-gdb] IPA: Fix build problem on !HAVE_GETAUXVAL
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d0a9981f372e636508b9a235017f2aba565e435d
commit d0a9981f372e636508b9a235017f2aba565e435d
Author: Marcin KoÅ?cielnicki <koriakin@0x04.net>
Date: Sun Apr 3 14:25:25 2016 +0200
IPA: Fix build problem on !HAVE_GETAUXVAL
These files need AT_PHDR, which is defined in elf.h. If HAVE_GETAUXVAL
is set, it's implicitely included by sys/auxv.h. Include it manually
for the opposite case.
gdb/gdbserver/ChangeLog:
* linux-aarch64-ipa.c: Add <elf.h> include.
* linux-ppc-ipa.c: Add <elf.h> include.
* linux-s390-ipa.c: Add <elf.h> include.
Diff:
---
gdb/gdbserver/ChangeLog | 6 ++++++
gdb/gdbserver/linux-aarch64-ipa.c | 1 +
gdb/gdbserver/linux-ppc-ipa.c | 1 +
gdb/gdbserver/linux-s390-ipa.c | 1 +
4 files changed, 9 insertions(+)
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 39a1be0..7b20fdb 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,9 @@
+2016-04-03 Marcin KoÅ?cielnicki <koriakin@0x04.net>
+
+ * linux-aarch64-ipa.c: Add <elf.h> include.
+ * linux-ppc-ipa.c: Add <elf.h> include.
+ * linux-s390-ipa.c: Add <elf.h> include.
+
2016-03-31 Marcin KoÅ?cielnicki <koriakin@0x04.net>
* tracepoint.c (gdb_collect_ptr): Remove const qualifier.
diff --git a/gdb/gdbserver/linux-aarch64-ipa.c b/gdb/gdbserver/linux-aarch64-ipa.c
index 50caeae..601d61c 100644
--- a/gdb/gdbserver/linux-aarch64-ipa.c
+++ b/gdb/gdbserver/linux-aarch64-ipa.c
@@ -21,6 +21,7 @@
#include "server.h"
#include <sys/mman.h>
#include "tracepoint.h"
+#include <elf.h>
#ifdef HAVE_GETAUXVAL
#include <sys/auxv.h>
#endif
diff --git a/gdb/gdbserver/linux-ppc-ipa.c b/gdb/gdbserver/linux-ppc-ipa.c
index 8489c6e..d8f118e 100644
--- a/gdb/gdbserver/linux-ppc-ipa.c
+++ b/gdb/gdbserver/linux-ppc-ipa.c
@@ -22,6 +22,7 @@
#include <sys/mman.h>
#include "tracepoint.h"
#include "linux-ppc-tdesc.h"
+#include <elf.h>
#ifdef HAVE_GETAUXVAL
#include <sys/auxv.h>
#endif
diff --git a/gdb/gdbserver/linux-s390-ipa.c b/gdb/gdbserver/linux-s390-ipa.c
index a9f86ad..cdf2fe72 100644
--- a/gdb/gdbserver/linux-s390-ipa.c
+++ b/gdb/gdbserver/linux-s390-ipa.c
@@ -22,6 +22,7 @@
#include <sys/mman.h>
#include "tracepoint.h"
#include "linux-s390-tdesc.h"
+#include <elf.h>
#ifdef HAVE_GETAUXVAL
#include <sys/auxv.h>
#endif