Skip to content

fix: guard platform-specific sources for cross-arch/cross-os builds#6

Open
manuschillerdev wants to merge 1 commit intoallyourcodebase:mainfrom
manuschillerdev:fix/cross-arch-build
Open

fix: guard platform-specific sources for cross-arch/cross-os builds#6
manuschillerdev wants to merge 1 commit intoallyourcodebase:mainfrom
manuschillerdev:fix/cross-arch-build

Conversation

@manuschillerdev
Copy link
Copy Markdown

@manuschillerdev manuschillerdev commented Mar 30, 2026

This is my first contribution and I am happy to accept any guidance or feedback to make this mergable.

Building with zig build -Dtarget=aarch64-macos fails with three distinct errors. Tested on Zig 0.16, macOS 15 (arm64).

  • x86_64 asm compiled on ARM: crypto/bn/asm/x86_64-gcc.c is in the unconditional source list, causing compilation failures on non-x86_64 targets
  • Missing arm_arch.h include: ARM crypto sources include arm_arch.h but upstream.path("crypto") wasn't in the include paths, only b.path("crypto") (the local overlay)
  • loongarchcap.c on non-Linux: includes sys/auxv.h which only exists on Linux, breaks macOS and other non-Linux builds

Test with:

zig build (native aarch64-macos) # passes
zig build -Dtarget=x86_64-linux-gnu # passes

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.

1 participant