public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
@ 2022-05-03 11:19 Luis Machado
  2022-05-03 11:24 ` Pedro Alves
  2022-05-03 15:21 ` Tom Tromey
  0 siblings, 2 replies; 15+ messages in thread
From: Luis Machado @ 2022-05-03 11:19 UTC (permalink / raw)
  To: gdb-patches

Doing a 32-bit build with "--enable-targets=all --disable-sim" fails to link
properly.

--

loongarch-tdep.o: In function `loongarch_gdbarch_init':
binutils-gdb/gdb/loongarch-tdep.c:443: undefined reference to `loongarch_r_normal_name'
loongarch-tdep.o: In function `loongarch_fetch_instruction':
binutils-gdb/gdb/loongarch-tdep.c:37: undefined reference to `loongarch_insn_length'
loongarch-tdep.o: In function `loongarch_scan_prologue(gdbarch*, unsigned long long, unsigned long long, frame_info*, trad_frame_cache*) [clone .isra.4]':
binutils-gdb/gdb/loongarch-tdep.c:87: undefined reference to `loongarch_insn_length'
binutils-gdb/gdb/loongarch-tdep.c:88: undefined reference to `loongarch_decode_imm'
binutils-gdb/gdb/loongarch-tdep.c:89: undefined reference to `loongarch_decode_imm'
binutils-gdb/gdb/loongarch-tdep.c:90: undefined reference to `loongarch_decode_imm'
binutils-gdb/gdb/loongarch-tdep.c:91: undefined reference to `loongarch_decode_imm'
binutils-gdb/gdb/loongarch-tdep.c:92: undefined reference to `loongarch_decode_imm'

--

Given the list of 64-bit BFD files in
opcodes/Makefile.am:TARGET64_LIBOPCODES_CFILES, it looks like GDB's
ALL_TARGET_OBS list is including files that should be included in
ALL_64_TARGET_OBS instead.

This patch accomplishes this and enables a 32-bit build with
"--enable-targets=all --disable-sim" to complete.

Moving the bpf, tilegx and loongarch files to the correct list means GDB can
find the correct disassembler function instead of finding a null pointer.

We still need the "--disable-sim" switch (or "--enable-64-bit-bfd") to
make a 32-bit build with "--enable-targets=all" complete correctly
---
 gdb/Makefile.in | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 418094775a5..d80087749de 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -715,9 +715,12 @@ ALL_64_TARGET_OBS = \
 	arch/aarch64-mte-linux.o \
 	arch/amd64.o \
 	arch/riscv.o \
+	bpf-tdep.o \
 	ia64-linux-tdep.o \
 	ia64-tdep.o \
 	ia64-vms-tdep.o \
+	loongarch-linux-tdep.o \
+	loongarch-tdep.o \
 	mips-fbsd-tdep.o \
 	mips-linux-tdep.o \
 	mips-netbsd-tdep.o \
@@ -734,7 +737,10 @@ ALL_64_TARGET_OBS = \
 	sparc64-netbsd-tdep.o \
 	sparc64-obsd-tdep.o \
 	sparc64-sol2-tdep.o \
-	sparc64-tdep.o
+	sparc64-tdep.o \
+	tilegx-linux-tdep.o \
+	tilegx-tdep.o
+
 
 # All other target-dependent objects files (used with --enable-targets=all).
 ALL_TARGET_OBS = \
@@ -762,7 +768,6 @@ ALL_TARGET_OBS = \
 	avr-tdep.o \
 	bfin-linux-tdep.o \
 	bfin-tdep.o \
-	bpf-tdep.o \
 	bsd-uthread.o \
 	cris-linux-tdep.o \
 	cris-tdep.o \
@@ -798,8 +803,6 @@ ALL_TARGET_OBS = \
 	linux-record.o \
 	linux-tdep.o \
 	lm32-tdep.o \
-	loongarch-linux-tdep.o \
-	loongarch-tdep.o \
 	m32c-tdep.o \
 	m32r-linux-tdep.o \
 	m32r-tdep.o \
@@ -856,8 +859,6 @@ ALL_TARGET_OBS = \
 	symfile-mem.o \
 	tic6x-linux-tdep.o \
 	tic6x-tdep.o \
-	tilegx-linux-tdep.o \
-	tilegx-tdep.o \
 	v850-tdep.o \
 	vax-netbsd-tdep.o \
 	vax-tdep.o \
-- 
2.25.1


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

end of thread, other threads:[~2022-05-30 10:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-03 11:19 [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS Luis Machado
2022-05-03 11:24 ` Pedro Alves
2022-05-03 11:30   ` Luis Machado
2022-05-03 21:51     ` Luis Machado
2022-05-05  9:06       ` Luis Machado
2022-05-05 10:29         ` Pedro Alves
2022-05-30 10:25           ` Luis Machado
2022-05-26  7:22         ` Luis Machado
2022-05-26 13:57           ` Simon Marchi
2022-05-26 17:45             ` Luis Machado
2022-05-26 13:59           ` Tom Tromey
2022-05-26 17:50             ` Luis Machado
2022-05-03 15:21 ` Tom Tromey
2022-05-03 16:20   ` Luis Machado
2022-05-04  8:00     ` Luis Machado

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).