DockerCLI/scripts/build
Sebastiaan van Stijn c2ba0a01b2
scripts/build/plugins: don't -buildmode=pie without CGO enabled
The `.variables` sets `CGO_ENABLED=1` on arm; b0c41b78d8/scripts/build/.variables (L57-L68)
And if enabled, it sets `-buildmode=pie`; b0c41b78d8/scripts/build/.variables (L79-L88)

But that looks to be conflicting with the hard-coded `CGO_ENABLED=0` in
this script.

    > [build-plugins 1/1] RUN --mount=ro --mount=type=cache,target=/root/.cache     xx-go --wrap &&     TARGET=/out ./scripts/build/plugins e2e/cli-plugins/plugins/*:
    0.127 Building static docker-helloworld
    0.127 + CGO_ENABLED=0
    0.127 + GO111MODULE=auto
    0.127 + go build -o /out/plugins-linux-arm/docker-helloworld -tags ' osusergo' -ldflags ' -X "github.com/docker/cli/cli/version.GitCommit=5c123b1" -X "github.com/docker/cli/cli/version.BuildTime=2024-09-02T13:52:17Z" -X "github.com/docker/cli/cli/version.Version=pr-5387" -extldflags -static' -buildmode=pie github.com/docker/cli/cli-plugins/examples/helloworld
    0.135 -buildmode=pie requires external (cgo) linking, but cgo is not enabled

Remove `GO_BUILDMODE` from this script so that we don't try to build
with `-buildmode=pie`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-19 10:25:05 +02:00
..
.variables darwin/build: Disallow CGO_ENABLED=1 when cross-compiling 2024-04-10 17:28:48 +02:00
binary use GO_LDFLAGS instead of LDFLAGS to prevent inheriting unrelated options 2022-03-31 10:30:56 +02:00
mkversioninfo fix version quad logic that trims 0 digit so returns an empty one 2022-03-31 21:14:29 +02:00
plugins scripts/build/plugins: don't -buildmode=pie without CGO enabled 2024-09-19 10:25:05 +02:00