Skip to content

armeabi-v7a: 32-bit ARM cross-build is experimental #11

Description

@Towartz

Status: Experimental / Best-effort

32-bit ARM (armeabi-v7a) support is marked as continue-on-error in CI — it will never block the arm64-v8a build.

Known issues

1. Upstream V8 cross-build bug (nodejs/node#58975)

V8 has an open bug when cross-compiling for 32-bit ARM targets from an x64 host. The symptom is incorrect source-file selection for the push_registers_asm helper — the x64 host variant gets selected instead of the ARM target variant.

2. Host toolchain -m32 / -m64 conflict

common.gypi unconditionally adds -m64 to host cflags/ldflags when host_arch=="x64", which conflicts with the -m32 required for building 32-bit host tools (torque, mksnapshot). Both flags end up on the same command line.

3. Static assertion failures

Several static_assert checks in V8 fail under 32-bit:

  • deps/v8/src/wasm/wasm-objects.h — alignment checks against kTaggedSize
  • deps/v8/src/objects/number-string-cache.h — size checks
  • deps/v8/src/sandbox/js-dispatch-table.h — entry size checks

Current mitigation: wrap these in /* */ block comments in the patch step.

4. Wrong push_registers_asm.cc selected (nodejs/node#58975)

The gyp build selects the x64 variant of push_registers_asm.cc instead of the arm variant when the host is x64 and target is arm. This causes undefined symbols at link time for SavePushRegistersAll and related functions.

What needs to be done

  1. Track upstream fix at Incorrect selection of x64 push_registers_asm.cc for host build when target is arm (Android) nodejs/node#58975
  2. Review Termux's 32-bit patches from packages/nodejs-lts (they carry working armeabi-v7a patches)
  3. Fix the -m32/-m64 conflict in common.gypi or override in the workflow
  4. Fix or replace the static_assert workarounds with proper upstream-compatible patches

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions