public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix libinproctrace.so build on PPC
@ 2022-04-28 14:42 Tom Tromey
  2022-04-28 16:13 ` Pedro Alves
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2022-04-28 14:42 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

The recent gnulib import caused a build failure of libinproctrace.so
on PPC:

    alloc.c:(.text+0x20): undefined reference to `rpl_malloc'
    alloc.c:(.text+0x70): undefined reference to `rpl_realloc'

This patch fixes the problem using the same workaround that was
previously used for free.
---
 gdbserver/Makefile.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in
index b9a687c9231..6e14278cd4b 100644
--- a/gdbserver/Makefile.in
+++ b/gdbserver/Makefile.in
@@ -470,7 +470,8 @@ UST_CFLAGS = $(ustinc) -DCONFIG_UST_GDB_INTEGRATION
 # Undo gnulib replacements for the IPA shared library build.
 # The gnulib headers are still needed, but gnulib is not linked
 # into the IPA lib so replacement apis don't work.
-UNDO_GNULIB_CFLAGS = -Drpl_strerror_r=strerror_r -Drpl_free=free
+UNDO_GNULIB_CFLAGS = -Drpl_strerror_r=strerror_r -Drpl_free=free \
+	-Drpl_malloc=malloc -Drpl_realloc=realloc
 
 # Note, we only build the IPA if -fvisibility=hidden is supported in
 # the first place.
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix libinproctrace.so build on PPC
  2022-04-28 14:42 [PATCH] Fix libinproctrace.so build on PPC Tom Tromey
@ 2022-04-28 16:13 ` Pedro Alves
  0 siblings, 0 replies; 2+ messages in thread
From: Pedro Alves @ 2022-04-28 16:13 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

On 2022-04-28 15:42, Tom Tromey via Gdb-patches wrote:
> The recent gnulib import caused a build failure of libinproctrace.so
> on PPC:
> 
>     alloc.c:(.text+0x20): undefined reference to `rpl_malloc'
>     alloc.c:(.text+0x70): undefined reference to `rpl_realloc'
> 
> This patch fixes the problem using the same workaround that was
> previously used for free.

OK.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-28 16:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 14:42 [PATCH] Fix libinproctrace.so build on PPC Tom Tromey
2022-04-28 16:13 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).