From: enh <enh@google.com>
To: Yao Qi <qiyaoltc@gmail.com>, enh <enh@google.com>,
gdb-patches@sourceware.org, Doug Evans <dje@google.com>
Subject: Re: [PATCH] Fix compiler warnings building against Linux uapi headers
Date: Tue, 25 Aug 2015 20:34:00 -0000 [thread overview]
Message-ID: <CAJgzZoo9c-JSgqXLjD863kRSngJuHhatUadaXrVTw20kDkunvw@mail.gmail.com> (raw)
In-Reply-To: <20150805085012.GF26572@vapier>
sorry; been too busy to get back to this. new patch addresses earlier comment:
2015-08-25 Elliott Hughes <enh@google.com>
* arm-linux-tdep.h, linux-arm-low.c: Only define HWCAP_VFP and
friends if they're not already defined. Fixes build against Linux
uapi headers.
diff --git a/gdb/arm-linux-tdep.h b/gdb/arm-linux-tdep.h
index dc05edf..d6a1181 100644
--- a/gdb/arm-linux-tdep.h
+++ b/gdb/arm-linux-tdep.h
@@ -61,9 +61,19 @@ void arm_linux_collect_nwfpe (const struct regset *regset,
/* ARM GNU/Linux HWCAP values. These are in defined in
<asm/elf.h> in current kernels. */
+#ifndef HWCAP_VFP
#define HWCAP_VFP 64
+#endif
+#ifndef HWCAP_IWMMXT
#define HWCAP_IWMMXT 512
+#endif
+#ifndef HWCAP_NEON
#define HWCAP_NEON 4096
+#endif
+#ifndef HWCAP_VFPv3
#define HWCAP_VFPv3 8192
+#endif
+#ifndef HWCAP_VFPv3D16
#define HWCAP_VFPv3D16 16384
+#endif
diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c
index 6a27e6e..60645de 100644
--- a/gdb/gdbserver/linux-arm-low.c
+++ b/gdb/gdbserver/linux-arm-low.c
@@ -117,11 +117,21 @@ struct arch_lwp_info
};
/* These are in <asm/elf.h> in current kernels. */
+#ifndef HWCAP_VFP
#define HWCAP_VFP 64
+#endif
+#ifndef HWCAP_IWMMXT
#define HWCAP_IWMMXT 512
+#endif
+#ifndef HWCAP_NEON
#define HWCAP_NEON 4096
+#endif
+#ifndef HWCAP_VFPv3
#define HWCAP_VFPv3 8192
+#endif
+#ifndef HWCAP_VFPv3D16
#define HWCAP_VFPv3D16 16384
+#endif
#ifdef HAVE_SYS_REG_H
#include <sys/reg.h>
On 8/5/15, Mike Frysinger <vapier@gentoo.org> wrote:
> On 26 Jun 2015 16:42, Yao Qi wrote:
>> enh <enh@google.com> writes:
>> > to remove gdbserver's duplicate definitions. But on the assumption
>> > that you do need to support old versions of glibc, here's a patch to
>> > avoid the redefinition...
>>
>> We should avoid the redefinition in gdb/arm-linux-tdep.h too. Could you
>> please fix it there too?
>>
>> > 2015-06-22 Elliott Hughes <enh@google.com>
>> >
>> > * linux-arm-low.c: Only define HWCAP_VFP and friends if they're
>> > not already defined. Fixes build against Linux uapi headers.
>>
>> OK with the changes.
>
> Elliott: you going to respin this ?
> -mike
>
--
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Android native code/tools questions? Mail me/drop by/add me as a reviewer.
next prev parent reply other threads:[~2015-08-25 20:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 19:09 enh
2015-06-26 15:42 ` Yao Qi
2015-08-05 8:50 ` Mike Frysinger
2015-08-25 20:34 ` enh [this message]
2015-08-26 11:25 ` Yao Qi
2015-08-26 15:25 ` enh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJgzZoo9c-JSgqXLjD863kRSngJuHhatUadaXrVTw20kDkunvw@mail.gmail.com \
--to=enh@google.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox