mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[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>
This commit is contained in:
parent
a38b43e4ab
commit
21fa0b2199
1 changed files with 6 additions and 1 deletions
|
|
@ -7,7 +7,12 @@
|
||||||
|
|
||||||
package boring
|
package boring
|
||||||
|
|
||||||
// #include "goboringcrypto.h"
|
/*
|
||||||
|
// goboringcrypto_linux_amd64.syso references pthread functions.
|
||||||
|
#cgo LDFLAGS: "-pthread"
|
||||||
|
|
||||||
|
#include "goboringcrypto.h"
|
||||||
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
import (
|
import (
|
||||||
"crypto/internal/boring/sig"
|
"crypto/internal/boring/sig"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue