Skip to content

ARM64 (aarch64) Linux host support - #10

Merged
LubosD merged 2 commits into
mainfrom
arm64-support
Nov 6, 2026
Merged

LubosD merged 2 commits into
mainfrom
arm64-support

Conversation

@LubosD

@LubosD LubosD commented Nov 6, 2026

Copy link
Copy Markdown
Member

Part of the ARM64 (aarch64) Linux host port, darlinghq/darling#1818. Please merge this before #1818, using a merge commit so the SHA that #1818's gitlink points at stays valid.

Commits

  • 9944563 Add ARM64 (aarch64) build support for Darling on Linux (kkHAIKE)
  • 607bc88 bootstrap_cmds: avoid 'chmod' target-name collision in mig.sh build (kkHAIKE)

Testing

Built and smoke-tested as part of #1818 on an aarch64 host (Debian 13, clang 19, 48-bit VA). x86_64 has not been re-tested yet. The ARM-specific changes are meant to sit behind __aarch64__/__arm64__ guards, but this still needs an x86_64 build.

Provenance

  • Changes come from the publicly posted ARM64 patchset (base port from ARM64 (aarch64) runtime, ABI, and build-system support darling#1753 by @kkHAIKE, follow-up fixes by fervi), with commit authorship preserved.
  • No disassembly of Apple binaries and no restricted material. Debugging was done only on Darling's own builds.
  • Prepared with Claude Code. Opened as a draft pending author review per AGENTS.md.

🤖 Generated with Claude Code

kkHAIKE and others added 2 commits November 6, 2026 08:00
The custom command that bakes the build-mig wrapper script invoked
plain 'chmod 0755 ...' as a build COMMAND. CMake resolves bare command
names against existing targets and adds an implicit strong dependency
when one matches — and the Darling tree _does_ build a Darwin-targeted
'chmod' Mach-O executable from src/external/file_cmds/chmod. The
resulting graph closes a cycle:

  migexe (UTILITY)
    → chmod (Mach-O EXECUTABLE; links libsystem_c, libsystem_kernel, ...)
      → system_kernel (SHARED_LIBRARY)
        → libsyscall_64 / libsyscall (OBJECT)
          → libsyscall_generate_mig_headers (UTILITY)
            → migexe

which CMake reports as 'Cyclic dependencies are allowed only among
static libraries' and refuses to regenerate.

Fix: invoke the host-side chmod via CMake's own builtin
'${CMAKE_COMMAND} -E chmod' (3.19+), which is parsed as a literal
program path, not as a target name. The added comment block in
bootstrap_cmds/CMakeLists.txt explains the trap so we don't regress.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@LubosD
LubosD marked this pull request as ready for review November 6, 2026 10:09
@LubosD
LubosD merged commit f382e74 into main Nov 6, 2026
2 checks passed
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.

2 participants