This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] IPA: Fix build problem on !HAVE_GETAUXVAL
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: koriakin at 0x04 dot net (Marcin KoÅcielnicki)
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 4 Apr 2016 16:41:02 +0200 (CEST)
- Subject: Re: [PATCH] IPA: Fix build problem on !HAVE_GETAUXVAL
- Authentication-results: sourceware.org; auth=none
> 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
#ifndef IN_PROCESS_AGENT
block, and so never has any effect ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com