This is the mail archive of the 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] IPA: Fix build problem on !HAVE_GETAUXVAL

> On 03/04/16 18:20, Ulrich Weigand wrote:
> >> 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.
> >> ---
> >> Here's a fix.  Does that sound right?
> >
> > This is OK.
> >
> > Thanks,
> > Ulrich
> >
> Thanks, pushed.

Hmm, it turns out build still fails for me, this time in the link step:

linux-ppc-ipa.o: In function `alloc_jump_pad_buffer':
gdb/gdbserver/linux-ppc-ipa.c:121: undefined reference to `getauxval'

Looking at tracepoint.c, I notice that the definition of getauxval

#if !defined HAVE_GETAUXVAL && defined IN_PROCESS_AGENT
/* Retrieve the value of TYPE from the auxiliary vector.  If TYPE is not
   found, 0 is returned.  This function is provided if glibc is too old.  */

unsigned long
getauxval (unsigned long type)

is itself within a


block, and so never has any effect ...


  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain

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