Skip to content
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

make boringcrypto: add checklinkname flag for go1.23 #1197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wadey
Copy link
Member

@wadey wadey commented Aug 13, 2024

Starting with go1.23, we need to set -checklinkname=0 when building for boringcrypto because we need to use go:linkname to access newGCMTLS.

Note that this does break builds when using a go version less than go1.23.0. We can probably assume that someone using this Makefile and manually building is using the latest release of Go though.

See:

Without this change on go1.23+, you will see an error like this:

# github.com/slackhq/nebula/cmd/nebula
link: github.com/slackhq/nebula/noiseutil: invalid reference to crypto/internal/boring.NewGCMTLS

Starting with go1.23, we need to set -checklinkname=0 when building for
boringcrypto because we need to use go:linkname to access `newGCMTLS`.

Note that this does break builds when using a go version less than
go1.23.0. We can probably assume that someone using this Makefile and
manually building is using the latest release of Go though.

See:

- https://go.dev/doc/go1.23#linker
@wadey wadey added this to the v1.10.0 milestone Aug 13, 2024
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