aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/internal/boring/boring.go
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2021-12-03 17:13:08 -0500
committerCherry Mui <cherryyz@google.com>2021-12-06 16:54:47 +0000
commit21fa0b21996bc70c171bfa0f0c8917ecb0e73c75 (patch)
tree859d9bfaa3f037107e40313c1390ce7faeaf5d6f /src/crypto/internal/boring/boring.go
parenta38b43e4ab62b974fce5ba34fc17f442e725af6a (diff)
downloadgo-21fa0b21996bc70c171bfa0f0c8917ecb0e73c75.tar.gz
go-21fa0b21996bc70c171bfa0f0c8917ecb0e73c75.zip
[dev.boringcrypto] crypto/internal/boring: add -pthread linker flag
goboringcrypto_linux_amd64.syso references pthread functions, so we need to pass -pthread to the C linker when external linking. Usually it is automatically added when linking with runtime/cgo package. But in shared linkage the runtime/cgo package may be in a separate DSO and not part of this invocation. Fixes #49965. Change-Id: I3a9983e715ee804594a14006f212f76769ad71db Reviewed-on: https://go-review.googlesource.com/c/go/+/369161 Trust: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org>
Diffstat (limited to 'src/crypto/internal/boring/boring.go')
-rw-r--r--src/crypto/internal/boring/boring.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/crypto/internal/boring/boring.go b/src/crypto/internal/boring/boring.go
index f34243fe26..b8804ceb68 100644
--- a/src/crypto/internal/boring/boring.go
+++ b/src/crypto/internal/boring/boring.go
@@ -7,7 +7,12 @@
package boring
-// #include "goboringcrypto.h"
+/*
+// goboringcrypto_linux_amd64.syso references pthread functions.
+#cgo LDFLAGS: "-pthread"
+
+#include "goboringcrypto.h"
+*/
import "C"
import (
"crypto/internal/boring/sig"