From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1585) id 778543839C4C; Mon, 30 May 2022 10:25:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 778543839C4C Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Luis Machado To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS X-Act-Checkin: binutils-gdb X-Git-Author: Luis Machado X-Git-Refname: refs/heads/master X-Git-Oldrev: c1d0eab1b1177f1f6f87420767d0e7a3d0f67368 X-Git-Newrev: 09cb5e2312e299bd3e362f8acb070560a06d156a Message-Id: <20220530102534.778543839C4C@sourceware.org> Date: Mon, 30 May 2022 10:25:34 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2022 10:25:34 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D09cb5e2312e2= 99bd3e362f8acb070560a06d156a commit 09cb5e2312e299bd3e362f8acb070560a06d156a Author: Luis Machado Date: Wed Apr 27 15:49:04 2022 +0100 Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS =20 Doing a 32-bit build with "--enable-targets=3Dall --disable-sim" fails = to link properly. =20 -- =20 loongarch-tdep.o: In function `loongarch_gdbarch_init': binutils-gdb/gdb/loongarch-tdep.c:443: undefined reference to `loongarc= h_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*, unsign= ed long long, unsigned long long, frame_info*, trad_frame_cache*) [clone .i= sra.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' =20 -- =20 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. =20 This patch accomplishes this and enables a 32-bit build with "--enable-targets=3Dall --disable-sim" to complete. =20 Moving the bpf, tilegx and loongarch files to the correct list means GD= B can find the correct disassembler function instead of finding a null pointe= r. =20 We still need the "--disable-sim" switch (or "--enable-64-bit-bfd") to make a 32-bit build with "--enable-targets=3Dall" 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 =3D \ 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 =3D \ 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 + =20 # All other target-dependent objects files (used with --enable-targets=3Da= ll). ALL_TARGET_OBS =3D \ @@ -762,7 +768,6 @@ ALL_TARGET_OBS =3D \ 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 =3D \ 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 =3D \ 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 \