File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -96,11 +96,11 @@ if test -n "${PLATFORM}"; then
9696 GO_LDFLAGS=" $GO_LDFLAGS -X \" github.com/docker/cli/cli/version.PlatformName=${PLATFORM} \" "
9797fi
9898if [ " $CGO_ENABLED " = " 1" ] && [ " $GO_LINKMODE " = " static" ] && [ " $( go env GOOS) " = " linux" ]; then
99- GO_LDFLAGS=" $GO_LDFLAGS -extldflags -static"
99+ GO_LDFLAGS=" $GO_LDFLAGS -linkmode external - extldflags -static"
100100fi
101101if [ " $CGO_ENABLED " = " 1" ] && [ " $GO_LINKMODE " = " static" ]; then
102- # compiling statically with CGO enabled requires osusergo to be set.
103- GO_BUILDTAGS=" $GO_BUILDTAGS osusergo"
102+ # compiling statically with CGO enabled requires osusergo and netgo to be set.
103+ GO_BUILDTAGS=" $GO_BUILDTAGS osusergo netgo "
104104fi
105105if [ -n " $GO_STRIP " ]; then
106106 # if stripping enabled and building with llvm < 12 against darwin/amd64
You can’t perform that action at this time.
0 commit comments