CATEGORY="Devel"
SUMMARY="A GNU cross-toolchain supporting COFF for the Hitachi H8/300"
DESCRIPTION="Includes the following toolchain components for
h8300-hitachi-coff, but because GNU tools no longer support
'generic COFF' targets, the included tool versions are older.
Included tool components and versions include the following:
GNU Binary Utilities (BinUtils-2.16.1), GNU Compiler Collection
(GCC-3.4.6), GNU Pascal Compiler (GPC-2.1-20070904), NewLib (1.19.0),
and GNU Debugger (GDB-5.8).  Supported programming languages
include the following: Assembly, C, C++, Fortran77, Java (GCJ),
Objective-C, Pascal (GPC), and TreeLang.  This toolchain can
also be used with the LEGO MindStorms RCX, as it was built
around an H8/300 processor."

The Cygport file and a locally-built package are available at the following 
link:
 * 
https://github.com/BrickBot/h8300-hitachi-coff-toolchain.cygport/releases/tag/v1.1.1-1-beta1

Analogous packages are available in Debian as "binutils-h8300-hms" and 
"gcc-h8300-hms" (note that these actually target the h8300-hitachi-coff and 
that Debian maintainers themselves have noted that these packages should be 
renamed):
 * 
https://packages.debian.org/search?keywords=h8300&searchon=names&suite=stable&section=all
 * 
https://sources.debian.org/src/gcc-h8300-hms/1%3A3.4.6%2Bdfsg2-4.2/debian/rules/#L30-L32

This particular package for Cygwin is built following the standard process for 
a combined build of binutils, gcc, gpc, newlib, and gdb.  The following 
repository on GitHub is used to maintain these legacy packages and work to 
continue to keep them buildable as time progresses:
 * https://github.com/BrickBot/GNU-Legacy-Toolchain

Also setup is a separate repository on GitHub with the Cygport file and an 
associated GitHub matrix workflow (covering both x86_64 and x86) to build the 
respective Cygwin packages.
* https://github.com/BrickBot/h8300-hitachi-coff-toolchain.cygport

The Cygwin packages locally and is how the binary package has been posted; 
however, a few hiccups encountered along the way with Cygport should be noted:

 (1) Variable resolution in Cygport file:
While the variables in the Cygport file like the following resolve with no 
issue:
SRC_URI="${HOMEPAGE}/archive/refs/tags/v${VERSION}.tar.gz"

Cygport is resolving "VERSION" from the following block in the Cygport file as 
just "..":
VERSION_MAJOR=1
VERSION_MINOR=1
VERSION_PATCH=0
VERSION="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}"

 (2) DIFF_EXCLUDES="**/*" would seem by definition to exclude everything from 
source diff but isn't excluding anything in Cygport (tried both with and 
without the quotes):
 * https://cygwin.github.io/cygport/pkg_pkg_cygpart.html#DIFF_EXCLUDES

Testing on https://globster.xyz/ would appear to indicate that that "**/*" 
should exclude everything.  Is there something I've missed that might be needed 
to exclude all files from the auto-generated source diff?

 (3) For packages listed with the BUILD_REQUIRES variable in the Cygport file, 
should Cyport automatically install any not-yet-installed packages that are 
listed therein, or is this primarily information for other who might want to 
build the package?  At least under GitHub workflow, Cygport was not 
automatically installing any required but missing packages.
 * https://cygwin.github.io/cygport/check_funcs_cygpart.html#BUILD_REQUIRES

 (4) Under GitHub Actions, the "cygport package" command is throwing the 
following errors, and then subsequent steps in the GitHub workflow can't seem 
to find the binary package generated by Cygport.  Does the Cygport package 
perhaps require an additional dependency that is currently not being included 
automatically.
========== BEGIN EXCERPT ==========
-e:1:in `<main>': undefined method `default_dirs' for module Gem (NoMethodError)

print Gem.default_dirs[:system][:gem_dir]
         ^^^^^^^^^^^^^
Did you mean?  default_dir
-e:1:in `<main>': undefined method `default_dirs' for module Gem (NoMethodError)

print Gem.default_dirs[:system][:ext_dir]
         ^^^^^^^^^^^^^
Did you mean?  default_dir
========== END EXCERPT ==========

Full context is available at the following links under the "Package the build" 
step (issue appears to be the same for both x86_64 and x86):
 * x86_64 - 
https://github.com/BrickBot/h8300-hitachi-coff-toolchain.cygport/actions/runs/16131778965/job/45520414147
 * x86 - 
https://github.com/BrickBot/h8300-hitachi-coff-toolchain.cygport/actions/runs/16131778965/job/45520414149


Thank you,
Matthew

Reply via email to