public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Luis Machado <luisgpm@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
Date: Mon, 30 May 2022 10:25:34 +0000 (GMT)	[thread overview]
Message-ID: <20220530102534.778543839C4C@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=09cb5e2312e299bd3e362f8acb070560a06d156a

commit 09cb5e2312e299bd3e362f8acb070560a06d156a
Author: Luis Machado <luis.machado@arm.com>
Date:   Wed Apr 27 15:49:04 2022 +0100

    Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
    
    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

Diff:
---
 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 \


                 reply	other threads:[~2022-05-30 10:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220530102534.778543839C4C@sourceware.org \
    --to=luisgpm@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).