Skip to content

Fix syscall build errors on M1 Macs (darwin/arm64) #1029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 30, 2021

Conversation

nevkontakte
Copy link
Member

Apart from the fix itself, this PR includes changes to the build system required for the fix to work:

  • Support GOARCH build constraints for syscall overlays.
  • Respect GOARCH environment variable when building syscall package.

Fixes #1027.

So long as we rely on OS-specific syscalls, we must build the package
with OS-appropriate GOOS/GOARCH (see also
gopherjs#693). Using runtime.GOOS
here is not ideal, since it ignores environment variables, making
"cross-compiling" impossible.

This is not a big deal in most cases, but makes reproducing errors like
in gopherjs#1027 more difficult.
This mimics behavior of the build context for the upstream sources and
allows us to customize overlays for the darwin/arm64 platform.
They seem to be using different trampoline function names compared to
intel architecture.
@nevkontakte nevkontakte requested a review from flimzy May 30, 2021 16:56
@nevkontakte nevkontakte merged commit 9a6984c into gopherjs:master May 30, 2021
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.

Undeclared names on Mac M1
2 participants