Fix compiler warnings building against Linux uapi headers
Commit Message
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.
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
>
Comments
enh <enh@google.com> writes:
> 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.
We need two changelog entries for gdb/ChangeLog and
gdb/gdbserver/ChangeLog respectively. The last sentence "Fixes build
against Linux uapi headers" is not needed.
OK with the changes.
2015-08-26 Elliott Hughes <enh@google.com>
* arm-linux-tdep.h: Only define HWCAP_VFP and friends if they're
not already defined.
2015-08-26 Elliott Hughes <enh@google.com>
* linux-arm-low.c: Only define HWCAP_VFP and friends if they're
not already defined.
On 8/26/15, Yao Qi <qiyaoltc@gmail.com> wrote:
> enh <enh@google.com> writes:
>
>> 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.
>
> We need two changelog entries for gdb/ChangeLog and
> gdb/gdbserver/ChangeLog respectively. The last sentence "Fixes build
> against Linux uapi headers" is not needed.
>
> OK with the changes.
>
> --
> Yao (齐尧)
>
@@ -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
@@ -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>