From: Pedro Alves <palves@redhat.com>
To: Nick Clifton <nickc@redhat.com>, gdb-patches@sourceware.org
Subject: Re: RFA: Add xmalloc_failed() to common-utils.c
Date: Wed, 01 Jun 2016 10:22:00 -0000 [thread overview]
Message-ID: <8180a7ba-a386-4cc2-aeb3-62aba14da5b1@redhat.com> (raw)
In-Reply-To: <87inxtgtc2.fsf@redhat.com>
On 06/01/2016 10:18 AM, Nick Clifton wrote:
> Hi Guys,
>
> I am finding that GDB currently fails to build because of a problem
> with libiberty and multiple definitions of xmalloc. For example:
>
> % cd arm-eabi
> % make all-gdb
> [...]
> ../libiberty/libiberty.a(xmalloc.o): In function `xmalloc':
> libiberty/xmalloc.c:147: multiple definition of `xmalloc'
> common-utils.o:/work/sources/gcc/current/gdb/common/common-utils.c:41: first defined here
> [...]
>
> Which is strange because the xmalloc functions provided by
> common-utils.c ought to be sufficient. I have traced this down to the
> fact that libiberty's cplus-dem.o file includes an unresolved reference
> to the xmalloc_failed() function. (I am not sure exactly how this
> reference comes about however).
Sounds like you're using a combined gcc+binutils-gdb build?
Our libiberty copy is behind gcc's -- gcc's has a patch that
added a reference to xmalloc_failed to cplus-dem.c:
https://gcc.gnu.org/ml/gcc-patches/2016-04/msg00072.html
So turns out you're preemptively fixing a problem for whoever
merges libiberty next.
> The fix for the problem is, I think, quite straightforward - provide a
> copy of the xmalloc_failed function in common-utils.c. I have tested
> this patch with a variety of different targets (x86, x86_64, arm,
> msp430) and not found any problems or regressions. So...
>
> OK to apply ?
OK.
Thanks,
Pedro Alves
next parent reply other threads:[~2016-06-01 10:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87inxtgtc2.fsf@redhat.com>
2016-06-01 10:22 ` Pedro Alves [this message]
2016-06-01 10:45 ` Nick Clifton
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=8180a7ba-a386-4cc2-aeb3-62aba14da5b1@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=nickc@redhat.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