From 9c6fb08a6dd15e950731a0440691c234e4227b30 Mon Sep 17 00:00:00 2001 From: Wade Simmons Date: Tue, 13 Aug 2024 13:49:10 -0400 Subject: [PATCH] make boringcrypto: add checklinkname flag for go1.23 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 --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 0d0943f0a..b3f7e9c58 100644 --- a/Makefile +++ b/Makefile @@ -133,6 +133,8 @@ build/linux-mips-softfloat/%: LDFLAGS += -s -w # boringcrypto build/linux-amd64-boringcrypto/%: GOENV += GOEXPERIMENT=boringcrypto CGO_ENABLED=1 build/linux-arm64-boringcrypto/%: GOENV += GOEXPERIMENT=boringcrypto CGO_ENABLED=1 +build/linux-amd64-boringcrypto/%: LDFLAGS += -checklinkname=0 +build/linux-arm64-boringcrypto/%: LDFLAGS += -checklinkname=0 build/%/nebula: .FORCE GOOS=$(firstword $(subst -, , $*)) \