mirror of https://github.com/docker/cli.git
build: add -buildmode=pie
Make all dynbinary builds be position-independent (this adds both security benefits and can help with flaky builds on POWER architectures). Signed-off-by: Aleksa Sarai <asarai@suse.de>
This commit is contained in:
parent
edfd623594
commit
164e812b7a
|
@ -9,6 +9,6 @@ source ./scripts/build/.variables
|
|||
|
||||
echo "Building dynamically linked $TARGET"
|
||||
export CGO_ENABLED=1
|
||||
go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" "${SOURCE}"
|
||||
go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=pie "${SOURCE}"
|
||||
|
||||
ln -sf "$(basename "${TARGET}")" build/docker
|
||||
|
|
Loading…
Reference in New Issue