[PR #2112] [MERGED] docs(ghidra): verified macOS arm64 native decompiler build recipe #5036

Closed
opened 2026-10-31 00:59:42 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2112
Author: @nKOxxx
Created: 10/12/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @baron

Base: main ← Head: docs/arm64-decompiler-origin


📝 Commits (1)

  • 5e9be90 docs(ghidra): verify and document the macOS arm64 native decompiler build

📊 Changes

1 file changed (+28 additions, -1 deletions)

View changed files

📝 docs/installation.md (+28 -1)

📄 Description

Summary

Extends the macOS native decompiler section in docs/installation.md with the Apple Silicon counterpart to the existing x64 recipe, closes the gap the x64 note calls out ("For other architectures..."), and records the verification evidence.

Refs #1994 (the arm64 gap explicitly left open there).

What changed

  • New ### macOS arm64 native decompiler subsection: make ghidra_opt ARCH_TYPE="-arch arm64" OSDIR=mac_arm_64, then the same guarded install step as the x64 recipe.
  • Replaces the closing "For other architectures" pointer in the x64 paragraph with the Gradle pointer only, since arm64 now has its own verified recipe directly below.
  • Adds a verification paragraph: toolchain, observed doctor outcome, and the fallback ADDITIONAL_FLAGS="-w" if a toolchain rejects the inherited -mmacosx-version-min=10.6 flag.

Why the overrides are safe

ARCH_TYPE and OSDIR are ordinary make variables in the Ghidra 12.1.4 decompiler Makefile (the Darwin block sets them with plain =), so command-line assignments replace them for every compile and link rule, including the ghidra_opt install rule that uses $(OSDIR). No Makefile edits.

Verification (all commands run on the documented paths)

macOS 15.6 arm64 (native, not Rosetta), Apple clang 17, stock bison 2.3, JDK 21, Ghidra 12.1.4 PUBLIC:

  1. make ghidra_opt ARCH_TYPE="-arch arm64" OSDIR=mac_arm_64 completes with rc 0; file ghidra_opt reports Mach-O 64-bit executable arm64.
  2. Guarded install to Ghidra/Features/Decompiler/os/mac_arm_64/decompile.
  3. rea doctor --json before: ghidra-native_decompiler fails with executable_missing; after: healthy, "reports mach-o arm64, which matches darwin/arm64". All other ghidra-* checks stay healthy.
  4. Live proof: rea decompile <arm64 Mach-O> --procedure 0x... --format json returns rc 0 with decompiled C (int _add(int param_1,int param_2) { return param_1 + param_2; }) from the Ghidra provider, no limitations.

Docs checks: npm run docs:check passes (6/6 tasks).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/2112 **Author:** [@nKOxxx](https://github.com/nKOxxx) **Created:** 10/12/2026 **Status:** ✅ Merged **Merged:** 10/12/2026 **Merged by:** [@baron](https://github.com/baron) **Base:** `main` ← **Head:** `docs/arm64-decompiler-origin` --- ### 📝 Commits (1) - [`5e9be90`](https://github.com/morluto/rea/commit/5e9be90f75f6c79ee5d4813c861b7aa5e61c589b) docs(ghidra): verify and document the macOS arm64 native decompiler build ### 📊 Changes **1 file changed** (+28 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/installation.md` (+28 -1) </details> ### 📄 Description ## Summary Extends the macOS native decompiler section in `docs/installation.md` with the Apple Silicon counterpart to the existing x64 recipe, closes the gap the x64 note calls out ("For other architectures..."), and records the verification evidence. Refs #1994 (the arm64 gap explicitly left open there). ## What changed - New `### macOS arm64 native decompiler` subsection: `make ghidra_opt ARCH_TYPE="-arch arm64" OSDIR=mac_arm_64`, then the same guarded `install` step as the x64 recipe. - Replaces the closing "For other architectures" pointer in the x64 paragraph with the Gradle pointer only, since arm64 now has its own verified recipe directly below. - Adds a verification paragraph: toolchain, observed doctor outcome, and the fallback `ADDITIONAL_FLAGS="-w"` if a toolchain rejects the inherited `-mmacosx-version-min=10.6` flag. ## Why the overrides are safe `ARCH_TYPE` and `OSDIR` are ordinary make variables in the Ghidra 12.1.4 decompiler Makefile (the Darwin block sets them with plain `=`), so command-line assignments replace them for every compile and link rule, including the `ghidra_opt` install rule that uses `$(OSDIR)`. No Makefile edits. ## Verification (all commands run on the documented paths) macOS 15.6 arm64 (native, not Rosetta), Apple clang 17, stock bison 2.3, JDK 21, Ghidra 12.1.4 PUBLIC: 1. `make ghidra_opt ARCH_TYPE="-arch arm64" OSDIR=mac_arm_64` completes with rc 0; `file ghidra_opt` reports `Mach-O 64-bit executable arm64`. 2. Guarded install to `Ghidra/Features/Decompiler/os/mac_arm_64/decompile`. 3. `rea doctor --json` before: `ghidra-native_decompiler` fails with `executable_missing`; after: healthy, "reports mach-o arm64, which matches darwin/arm64". All other ghidra-* checks stay healthy. 4. Live proof: `rea decompile <arm64 Mach-O> --procedure 0x... --format json` returns rc 0 with decompiled C (`int _add(int param_1,int param_2) { return param_1 + param_2; }`) from the Ghidra provider, no limitations. Docs checks: `npm run docs:check` passes (6/6 tasks). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:59:42 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5036
No description provided.