mirror of https://github.com/docker/cli.git
-buildmode=pie is not supported for the mips arch
reference: 4c99c81326
Signed-off-by: Xiaodong Liu <liuxiaodong@loongson.cn>
This commit is contained in:
parent
f7185d27e1
commit
eeafa40154
|
@ -9,6 +9,16 @@ source ./scripts/build/.variables
|
||||||
|
|
||||||
echo "Building dynamically linked $TARGET"
|
echo "Building dynamically linked $TARGET"
|
||||||
export CGO_ENABLED=1
|
export CGO_ENABLED=1
|
||||||
go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=pie "${SOURCE}"
|
case "$(go env GOARCH)" in
|
||||||
|
mips*|ppc64)
|
||||||
|
# pie build mode is not supported on mips architectures
|
||||||
|
GO_BUILDMODE=""
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
GO_BUILDMODE="-buildmode=pie"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" ${GO_BUILDMODE} "${SOURCE}"
|
||||||
|
|
||||||
ln -sf "$(basename "${TARGET}")" build/docker
|
ln -sf "$(basename "${TARGET}")" build/docker
|
||||||
|
|
Loading…
Reference in New Issue