This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] gdbserver: Add linux_get_hwcap



> On 28 Mar 2019, at 09:50, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> 
> Alan Hayward wrote:
> 
>>           * linux-low.c (linux_get_auxv): New function.
>>           (linux_get_hwcap): Likewise.
>>           (linux_get_hwcap2): Likewise.
> 
> This still breaks the build on my Cell/B.E. dailybuild:
> 
> gdb/gdbserver/linux-low.c: In function 'CORE_ADDR linux_get_hwcap2(int)':
> gdb/gdbserver/linux-low.c:7471:36: error: 'AT_HWCAP2' was not declared in this scope
>   return linux_get_auxv (wordsize, AT_HWCAP2);
>                                    ^~~~~~~~~
> 
> The system (RHEL5) is so old that the system headers do not
> yet provide AT_HWCAP2.  The old code worked because
> linux-ppc-low.c got the define via #include "elf/common.h",
> which linux-low.c does not include.
> 

Gah! Another failure. Apologies.

> I guess we should either have linux-low.c include the local
> file as well (if that is possible -- there may be conflicts
> with <elf.h> that is otherwise already included), or else
> provide a fallback define of AT_HWCAP2 only.

I’ve just tried adding the include and I get conflicts.

Linux-low already has some similar fallback defines, eg:

#ifndef O_LARGEFILE
#define O_LARGEFILE 0
#endif

I’ll send out a new OBV patch with the AT_HWCAP2 added in the same way.



Alan.


> 
> Bye,
> Ulrich
> 
> -- 
>  Dr. Ulrich Weigand
>  GNU/Linux compilers and toolchain
>  Ulrich.Weigand@de.ibm.com
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]