* Re: RFA: Add xmalloc_failed() to common-utils.c
[not found] <87inxtgtc2.fsf@redhat.com>
@ 2016-06-01 10:22 ` Pedro Alves
2016-06-01 10:45 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Pedro Alves @ 2016-06-01 10:22 UTC (permalink / raw)
To: Nick Clifton, gdb-patches
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: RFA: Add xmalloc_failed() to common-utils.c
2016-06-01 10:22 ` RFA: Add xmalloc_failed() to common-utils.c Pedro Alves
@ 2016-06-01 10:45 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2016-06-01 10:45 UTC (permalink / raw)
To: Pedro Alves, gdb-patches
Hi Pedro,
> Sounds like you're using a combined gcc+binutils-gdb build?
Yes. :-)
>> OK to apply ?
>
> OK.
Thanks - done.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-01 10:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <87inxtgtc2.fsf@redhat.com>
2016-06-01 10:22 ` RFA: Add xmalloc_failed() to common-utils.c Pedro Alves
2016-06-01 10:45 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox