)]}'
{
  "commit": "a96eadd871207cc7a811def35fb32a971c6be1bb",
  "tree": "2655f95be28854f7b07c5e545dfc881bb6fc5d1a",
  "parents": [
    "0ca813c3d57cfe13f7281dcbe6774cdb2ede6f26"
  ],
  "author": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Thu Dec 09 17:51:10 2021 +0000"
  },
  "committer": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Mon Dec 13 10:56:09 2021 +0000"
  },
  "message": "gdb: only include mips and riscv targets if building with 64-bit bfd\n\nWhile testing another patch I was trying to build different\nconfigurations of GDB, and, during one test build I ran into a\nproblem, I configured with `--enable-targets\u003dall\n--host\u003di686-w64-mingw32` and saw this error while linking GDB:\n\n  .../i686-w64-mingw32/bin/ld: mips-tdep.o: in function `mips_gdbarch_init\u0027:\n  .../src/gdb/mips-tdep.c:8730: undefined reference to `disassembler_options_mips\u0027\n  .../i686-w64-mingw32/bin/ld: riscv-tdep.o: in function `riscv_gdbarch_init\u0027:\n  .../src/gdb/riscv-tdep.c:3851: undefined reference to `disassembler_options_riscv\u0027\n\nSo the `disassembler_options_mips` and `disassembler_options_riscv`\nsymbols are missing.\n\nThis turns out to be because mips-dis.c and riscv-dis.c, in which\nthese symbols are defined, are in the TARGET64_LIBOPCODES_CFILES list\nin opcodes/Makefile.am, these files are only built when we are\nbuilding with a 64-bit bfd.\n\nIf we look further, into bfd/Makefile.am, we can see that all the\nfiles matching elf*-riscv.lo are in the BFD64_BACKENDS list, as are\nthe elf*-mips.lo files, and (I know because I tried), the two\ndisassemblers do, not surprisingly, depend on features supplied from\nlibbfd.\n\nSo, though we can build most of GDB just fine for riscv and mips with\na 32-bit bfd, if I understand correctly, the final GDB\nexecutable (assuming we could get it to link) would not understand\nthese architectures at the bfd level, nor would there be any\ndisassembler available.  This sounds like a pretty useless GDB to me.\n\nSo, in this commit, I move the riscv and mips targets into GDB\u0027s list\nof targets that require a 64-bit bfd.  After this I can build GDB just\nfine with the configure options given above.\n\nThis was discussed on the mailing list in a couple of threads:\n\n  https://sourceware.org/pipermail/gdb-patches/2021-December/184365.html\n  https://sourceware.org/pipermail/binutils/2021-November/118498.html\n\nand it is agreed, that it is unfortunate that the 32-bit riscv and\n32-bit mips targets require a 64-bit bfd.  If in the future this\nsituation ever changes then it would be expected that some (or all) of\nthis patch would be reverted.  Until then though, this patch allows\nGDB to build when configured with --enable-targets\u003dall, and when using\na 32-bit libbfd.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bff27577b956266681752037b0b82edbc2c356c0",
      "old_mode": 33188,
      "old_path": "gdb/Makefile.in",
      "new_id": "f2966cf6c00ae0c1a3ac2ed3702d51a735765430",
      "new_mode": 33188,
      "new_path": "gdb/Makefile.in"
    }
  ]
}
