Skip to content

Build with GCC 16 and release 2.9 - #25

Merged
midwan merged 4 commits into
masterfrom
toolchain/gcc16
Nov 3, 2026
Merged

midwan merged 4 commits into
masterfrom
toolchain/gcc16

Conversation

@midwan

@midwan midwan commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Moves the build to amigadev/crosstools:m68k-amigaos-gcc10, which despite its tag ships AmigaPorts GCC 16.2.1b (-mlra on by default) and vasm 2.0f. It also fixes the problems that came up while reviewing the code for the new compiler, and bumps the release to 2.9.

Toolchain and CI

  • CI runs in the amigadev image, pinned by digest (sha256:7d2598ff…, built 2026-11-02). The 2.7 host-quit crash came from an unannounced image change, so the release binaries should not move unless the pin moves.
  • The image has no native C compiler, and its /usr/bin/as and /usr/bin/ld point at the m68k tools. CI installs gcc-<arch>-linux-gnu. The Makefile now gives the native compiler a build/host-bin/ directory holding symlinks to the triplet-prefixed native as/ld. The old -B<prefix> -fuse-ld=bfd trick depended on an unprefixed native ld.bfd, which this image no longer has.
  • tests/test_package_layout.sh reads icon tooltypes with tr instead of strings, because the image has no host binutils.
  • .gitattributes forces LF line endings. Without it, a Windows checkout broke the shell tests and would put CRLF into the packaged Install, README and guide. README and RELEASING drop the manual LF advice and show the Docker command with the native compiler install.

Warnings

GCC 16 builds every C file with no warnings under -Wall -Wextra. vasm 2.0f reported two warning 41 label/directive clashes:

  • uae.audio.asm: a column-1 Even was parsed as a label, so it never aligned anything. It is now the indented Even directive its neighbour already uses.
  • UAESND.asm: the unreferenced end: label is renamed to fileend:.

All four AHI outputs are byte-identical to master's.

Fixes

  • mhiuae.library: the ROMTag sat in the data hunk with both GCC 6.5 and GCC 16. It is now const and lands in the first code hunk, where the InitResident autodoc says a disk-based library's ROMTag must be.
  • host-download: the size-header parser overflowed a signed long on sizes of 2 GB or more. Such sizes are now treated as unknown.
  • host-shell: the console window-size report parser overflowed on long digit runs from type-ahead. Fields stop growing at 1000; valid reports parse as before.

Checked but left alone: uae_pragmas.h contains no inline asm, because trap calls go through the calltrap function pointer. That means the GCC 16 asm operand/clobber hazard doesn't apply. The NDK inline stubs are GCC 16 safe. host-quit still starts with jra _start, has no libc references and emits no 020+ instructions.

Verification

  • make clean all test package in the pinned image after installing the native compiler: exit 0, no compiler or assembler warnings, Host-Tools-2.9.lha produced.
  • Headless Amiberry (master fd0872d9a, Linux build, AROS ROM, 68020), booting a directory that holds the GCC 16 binaries (built before the 2.9 version bump):
    • host-info printed the host details.
    • host-env set/get round-tripped a value.
    • host-path translated a path.
    • OpenLibrary("MHI/mhiuae.library") returned the library at version 2.8 with the right ID string, and closing it worked.
    • host-quit closed Amiberry in about 10 s (twice).
  • Not runtime-tested: the AHI drivers (binaries unchanged) and MHI decoding (only init/open/close were run).

CI now runs in amigadev/crosstools:m68k-amigaos-gcc10 (GCC 16.2.1b), pinned by digest. The image has no native C compiler and its /usr/bin/as and ld are the m68k tools, so CI installs the native gcc and the Makefile links the unit tests through a directory of native as/ld symlinks. The package test reads icon tooltypes with tr instead of binutils strings, which the image lacks. Two AHI labels that newer vasm reports as directive conflicts are fixed; the driver binaries are unchanged.
mhiuae.library's ROMTag was in the data hunk; it is now const and lands in the first code hunk, as the InitResident autodoc requires. host-download's size header and host-shell's console size report parsers could overflow a signed long on long digit runs.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T23:38:50.270350Z f74c899 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@midwan
midwan merged commit c5e1cd9 into master Nov 3, 2026
2 checks passed
@midwan
midwan deleted the toolchain/gcc16 branch November 3, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant