diff options
| author | qmuntal <quimmuntal@gmail.com> | 2026-03-05 12:19:20 +0100 |
|---|---|---|
| committer | Quim Muntal <quimmuntal@gmail.com> | 2026-03-10 22:58:26 -0700 |
| commit | e30e65f7a8bda0351d9def5a6bc91471bddafd3d (patch) | |
| tree | c4fb99f0031750a3b21c9791528b73f4cc40e947 /src/runtime | |
| parent | d3651c588846e1147e5a72f71c133dc8288e1e13 (diff) | |
| download | go-e30e65f7a8bda0351d9def5a6bc91471bddafd3d.tar.xz | |
syscall,runtime/cgo: use cgo_ldflag to link against -lsocket and -lxnet on Solaris
The -lsocket and -lxnet flags are needed for accept4 syscall on Solaris.
The runtime/cgo package doens't use them, so it doesn't make sense for
it to explicitly link against those libraries.
Instead, use the //go:cgo_ldflag in the syscall package.
Cq-Include-Trybots: luci.golang.try:gotip-solaris-amd64
Change-Id: I10db524ebf1c720a460515d8c1f362b0070bd771
Reviewed-on: https://go-review.googlesource.com/c/go/+/751760
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Quim Muntal <quimmuntal@gmail.com>
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/cgo/cgo.go | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/runtime/cgo/cgo.go b/src/runtime/cgo/cgo.go index d356c19d3f..09ec803769 100644 --- a/src/runtime/cgo/cgo.go +++ b/src/runtime/cgo/cgo.go @@ -20,8 +20,6 @@ package cgo #cgo netbsd LDFLAGS: -lpthread #cgo openbsd LDFLAGS: -lpthread #cgo aix LDFLAGS: -Wl,-berok -#cgo solaris LDFLAGS: -lxnet -#cgo solaris LDFLAGS: -lsocket // Use -fno-stack-protector to avoid problems locating the // proper support functions. See issues #52919, #54313, #58385. |
