Skip to content

Report arm64 instead of aarch64 on macOS with the Java POSIX backend - #1415

Merged
graalvmbot merged 1 commit into
oracle:masterfrom
deronnax:darwin-arm64-machine
Dec 4, 2026
Merged

graalvmbot merged 1 commit into
oracle:masterfrom
deronnax:darwin-arm64-machine

Conversation

@deronnax

@deronnax deronnax commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #1389.

With the Java POSIX backend, uname is emulated and takes the machine name from the Java os.arch property, which is aarch64 on Apple silicon. CPython reports arm64 there, and macOS wheel platform tags use that name too. The native POSIX backend, which the graalpy launcher uses by default, already reports arm64.

Changes

  • PythonUtils.getPythonArch(), used by the emulated uname, now maps aarch64 to arm64 on Darwin. Linux still reports aarch64.
  • This changes os.uname().machine, platform.machine() and sysconfig.get_platform() with the Java backend. sys.implementation._multiarch is unchanged.
  • test_posix's test_uname now checks the machine name on macOS.
  • Changelog entry.

Validation

Tested locally on an arm64 MacBook.

  • Official GraalPy 25.6.5 macOS aarch64 release, to reproduce: --python.PosixModuleBackend=java reports aarch64 / macosx-11.0-aarch64, while the native backend reports arm64 / macosx-11.0-arm64.
  • Local mx python-jvm build with this change: both backends report arm64 / macosx-11.0-arm64.
  • mx graalpytest graalpython/com.oracle.graal.python.test/src/tests/test_posix.py (native backend): 81 passed, 11 skipped.
  • test_uname run separately on the Java backend: passed.

Model: Claude Sonnet 5.5, effort: medium

Fixes oracle#1389.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Mathieu Dupuy <deronnax@gmail.com>
@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 4, 2026
@graalvmbot
graalvmbot merged commit 09d4f58 into oracle:master Dec 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: GraalPy reports aarch64 on Apple silicon instead of arm64

3 participants