DockerCLI/scripts
Sebastiaan van Stijn df4531aadd
scripts/build/binary: disable pkcs11 on static builds with CGO_ENABLED=1
pkcs11 cannot be compiled statically if CGO is enabled (and glibc is used)
see 3897c3fa54/vendor/github.com/miekg/pkcs11/pkcs11.go (L75)
see https://github.com/docker/cli/pull/3490#issuecomment-1079711973

When trying to do otherwise, warnings are printed (and shouldn't be ignored,
similar to the `osusergo` build-tag):

    #32 [linux/amd64->s390x build 2/2] RUN --mount=type=bind,target=.,ro     --mount=type=cache,target=/root/.cache     --mount=from=dockercore/golang-cross:xx-sdk-extras,target=/xx-sdk,src=/xx-sdk     --mount=type=tmpfs,target=cli/winresources     xx-go --wrap &&     TARGET=/out ./scripts/build/binary &&     xx-verify $([ "static" = "static" ] && echo "--static") /out/docker
    #32 467.0 # github.com/docker/cli/cmd/docker
    #32 467.0 /usr/bin/s390x-linux-gnu-ld: /tmp/go-link-900380651/000018.o: in function `New':
    #32 467.0 /go/src/github.com/docker/cli/vendor/github.com/miekg/pkcs11/pkcs11.go:75: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    #32 467.0 /usr/bin/s390x-linux-gnu-ld: /tmp/go-link-900380651/000004.o: in function `_cgo_26061493d47f_C2func_getaddrinfo':
    #32 467.0 /tmp/go-build/cgo-gcc-prolog:58: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-01 22:31:20 +02:00
..
build scripts/build/binary: disable pkcs11 on static builds with CGO_ENABLED=1 2022-04-01 22:31:20 +02:00
docs validate manpages target 2022-02-25 17:11:17 +01:00
test/e2e update/remove various tests and options related to kubernetes support 2022-02-24 17:53:18 +01:00
vendor vendor dependencies with go1.17 2022-03-26 19:48:14 +01:00
warn-outside-container Use official shellcheck image 2019-02-26 15:10:38 +01:00