[Debian-lego-team] GCC and GDB Version Selections for Supporting H8/300 COFF Targets?

Matthew Sheets ms.github at outlook.com
Wed Aug 19 20:51:13 BST 2026


For target h8300-hitachi-coff, are there any known flags or options that would
bring GCC 4.4.7 target capabilities on par with GCC 3.4.6 and GDB 6.8 target
capabilities on part with GDB 5.3?

Otherwise, in the creation of a combined source tree for a toolchain targeting
h8300-hitachi-coff it seems that GCC 3.4.6 and GDB 5.3 are the versions most
suited to that target.  While newer versions continued support for that
target, the level of support appears to regress beyond those specific versions.

A number of components (e.g., libiberty, zlib, readline), do not seem to
exhibit regressions, so newer versions of those are able to be used in a
combined source tree.

While I have documented findings in greater detail elsewhere, top-line items
have included the following:
* GCC:  A BrickOS kernel built using GCC 4.4.7 is over 1 kb larger compared to
        one built using GCC 3.4.6.  [1]
* GDB:  COFF debugging is less well supported, including slower performance
        and issues detecting method boundaries [2]


It took a bit of work to get BrickEmu to interoperate with GDB 6.8, but for
the most part, the changes to support GDB 6.8 actually also improved the
interface with GDB 5.3, so the effort was not a total loss.  The main
incompatibility difference between versions seems to be in the size of the
register structure that GDB expects.  For what needed updated for GDB 6.8 but
continued to work across both versions, GDB 6.8 seems to require stricter
protocol adherence than GDB 5.3.  Thus, what worked with GDB 5.3 didn’t work
with GDB 6.8, but the changes made to work with GDB 6.8 actually work properly
under GDB 5.3, too.


Thank you,
Matthew

[1] https://github.com/BrickBot/GNU-Legacy-Toolchain#gcc-346-versus-gcc-447
[2] https://github.com/BrickBot/GNU-Legacy-Toolchain/issues/19



More information about the Debian-lego-team mailing list