Restore AmigaOS build and runtime support - #8660
Merged
Merged
Conversation
AmigaOS support has been broken since 1.5.3; this fixes it back up to current master. Four independent issues, in the order they'd otherwise be hit: - m68k-amigaos GCC miscompiles the rendering code at -O2 and above. Pin the platform (and the render sources specifically, since their COMPILE_OPTIONS are appended after the global flags and would otherwise re-enable -O2) to -O1. - std::random_device has no working entropy source on this toolchain and aborts on construction. It's called during static initialization of the global RNG, so the process dies before main() ever runs. Extend the existing old-Windows guard to also skip it on AmigaOS. - `--gc-sections` discards static constexpr data that's still referenced. magic_enum's per-enum name tables are the visible casualty: enum_name() returns a string_view with the correct length pointing at storage the linker collected, so every enum name reads back as garbage. Exclude AMIGA from -ffunction-sections/ -fdata-sections/--gc-sections, the same way PS4 already is. - std::filesystem can't create or resolve AmigaOS volume/assign paths such as PROGDIR: or Work:games (it treats the colon as an ordinary character). Add AmigaOS to DVL_NO_FILESYSTEM so the existing non-filesystem fallbacks handle these paths instead. Also required to build at all under a modern (15.2) m68k-amigaos GCC: a FindSDL wrapper that strips the thread-library flag CMake's bundled module picks (m68k-amigaos-g++ accepts neither -pthread nor the -lpthreads fallback), the existing threads-stub wired in for Amiga the same way it already is for the 3DS, and a small compat shim for __xpg_strerror_r, which this GCC's libstdc++ references but libnix doesn't provide.
…'s location and naming convention
StephenCWills
approved these changes
Aug 6, 2026
StephenCWills
enabled auto-merge (squash)
August 6, 2026 01:19
StephenCWills
pushed a commit
to JennaScvl/DevilutionX
that referenced
this pull request
Aug 9, 2026
Move the pinned m68k-amigaos-gcc10 digest from GCC 13.2 to the current GCC 15.2 build, keeping a fixed digest rather than floating on the tag (the whole reason it was pinned in the first place). Also patches prep.sh so AmigaPorts' libSDL12 still builds: GCC 14+ promotes several legacy-C conformance warnings to hard errors by default, which this 1990s-vintage codebase trips on every one of. The fix is gated on the actual compiler's major version, so it's a no-op under GCC 13.2 and only applies under 14+ -- verified both ways with a clean build. Requires diasurgical#8660 (Restore AmigaOS build and runtime support) to actually build successfully; without those fixes this compiler alone still hits the same failures documented there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AmigaOS support has been broken since 1.5.3; this fixes it back up to current master. Four independent issues, in the order they'd otherwise be hit:
m68k-amigaos GCC miscompiles the rendering code at -O2 and above. Pin the platform (and the render sources specifically, since their COMPILE_OPTIONS are appended after the global flags and would otherwise re-enable -O2) to -O1.
std::random_device has no working entropy source on this toolchain and aborts on construction. It's called during static initialization of the global RNG, so the process dies before main() ever runs. Extend the existing old-Windows guard to also skip it on AmigaOS.
--gc-sectionsdiscards static constexpr data that's still referenced. magic_enum's per-enum name tables are the visible casualty: enum_name() returns a string_view with the correct length pointing at storage the linker collected, so every enum name reads back as garbage. Exclude AMIGA from -ffunction-sections/ -fdata-sections/--gc-sections, the same way PS4 already is.std::filesystem can't create or resolve AmigaOS volume/assign paths such as PROGDIR: or Work:games (it treats the colon as an ordinary character). Add AmigaOS to DVL_NO_FILESYSTEM so the existing non-filesystem fallbacks handle these paths instead.
Also required to build at all under a modern (15.2) m68k-amigaos GCC: a FindSDL wrapper that strips the thread-library flag CMake's bundled module picks (m68k-amigaos-g++ accepts neither -pthread nor the -lpthreads fallback), the existing threads-stub wired in for Amiga the same way it already is for the 3DS, and a small compat shim for __xpg_strerror_r, which this GCC's libstdc++ references but libnix doesn't provide.