Add experimental aarch64-pc-msys support#348
Draft
Kreijstal wants to merge 7 commits into
Draft
Conversation
Teach the top-level, newlib, and winsup build logic to configure aarch64-pc-msys. Select the ARM64 runtime sources and direct linker path while retaining the existing x86_64 link rule. Assisted-by: OpenAI Codex: GPT-5
Kreijstal
force-pushed
the
aarch64-clang-experiment
branch
from
July 18, 2026 03:36
6011ee3 to
4be5b26
Compare
Resolve const-correctness, initializer, exception-specification, unused-code, and recursive-overload diagnostics exposed by the ARM64 Clang bootstrap. These changes are architecture-independent and intentionally isolated from the ARM64 implementation. Assisted-by: OpenAI Codex: GPT-5 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adapt AArch64 assembly and setjmp for PE/COFF, provide ARM64-only weak aliases without STABS, and select the long-double library sources appropriate for the LP64 MSYS ABI. Assisted-by: OpenAI Codex: GPT-5
Implement ARM64 startup, autoload thunks, TLS, signal contexts, exception handling, allocator bootstrap, import decoding, fork reconstruction, child-start retry, linker layout, and compatibility exports. Architecture-specific behavior is guarded from the x86_64 path. Assisted-by: OpenAI Codex: GPT-5 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Record the generated configure, Makefile, and helper-script outputs used by the cross build. Keeping this mechanical update separate makes the source changes reviewable. Assisted-by: OpenAI Codex: GPT-5
Document the cross-toolchain layout, configure arguments, support libraries, and known limitations for reproducing the Windows ARM64 runtime. Assisted-by: OpenAI Codex: GPT-5
Credit the Windows-on-ARM-Experiments runtime foundation and state that the tested QEMU path is the primary result. Assisted-by: OpenAI Codex: GPT-5
Kreijstal
force-pushed
the
aarch64-clang-experiment
branch
from
July 18, 2026 08:53
4be5b26 to
8e82bec
Compare
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.
This is an early port of
msys2-runtimeto native Windows ARM64(
aarch64-pc-msys). It builds on the AArch64 Cygwin work inWindows-on-ARM-Experiments,
adapts it to the MSYS2 3.6.9 tree, and adds a Clang-based cross-build path.
I tested the resulting runtime and Bash on Windows 11 ARM64 in QEMU/HVF. I am
opening this as a draft because the basic process model works, but several
runtime issues and the source-attribution cleanup still need to be addressed.
Changes
aarch64-pc-msysin the build systemallocation, and fork handling for ARM64
Testing
All existing GitHub Actions jobs pass, including the GCC, Clang, MSYS, and
CLANGARM64 configurations.
I also rebuilt commit
8e82becb50b8bf02fa0d0dd9cd6d53671d3a1347from a clean checkout with the pinned LLVM, binutils, mingw-w64, and
LLVM-MinGW inputs. The prepared DLL was a native AArch64 PE32+ image with
SHA-256:
On Windows 11 ARM64 under QEMU/HVF, that exact DLL passed:
LoadLibraryanddll_crt0resolutionsigsetjmp/siglongjmpprobe, 5/5 runs; saved signal masks wererestored and the
savemask=0case left the current mask unchangedOne earlier Bash status invocation ended with
0xC0000005. During the ten-runfork sweep, one child copy attempt reported Win32 error 299 and then succeeded
through the runtime retry path. These observations are consistent with the
transient QEMU child-start behavior described below, so this is functional
validation rather than a stability claim.
The reproduction gist
contains the pinned inputs, build scripts, hashes, probes, and captured output.
Known issues
/tmpsetup currently emits a warningjob
Prior work
The runtime implementation is derived from the Windows-on-ARM-Experiments
effort rather than being a separate ARM64 port. Before this is ready for
review, I need to compare the runtime commits against that history, retain
attribution for the code and designs carried over, and remove changes that
duplicate newer WOA work. The QEMU reproduction and Clang/MSYS2 adaptation are
the parts specifically validated here.