From daba5daf4fc76fe530f093125efe094c2dd93e8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Fab=C3=A6ch=20Brandt?= Date: Mon, 16 Jul 2018 13:07:13 +0200 Subject: [PATCH] -buildmode=pie is not supported on Linux on MIPS either MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kasper Fabæch Brandt --- hack/make/.binary | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hack/make/.binary b/hack/make/.binary index 9375926d6b..010c2c11da 100644 --- a/hack/make/.binary +++ b/hack/make/.binary @@ -50,10 +50,14 @@ if [ "$(go env GOOS)/$(go env GOARCH)" != "$(go env GOHOSTOS)/$(go env GOHOSTARC esac fi -# -buildmode=pie is not supported on Windows. -if [ "$(go env GOOS)" != "windows" ]; then - BUILDFLAGS+=( "-buildmode=pie" ) -fi +# -buildmode=pie is not supported on Windows and Linux on mips. +case "$(go env GOOS)/$(go env GOARCH)" in + windows/*|linux/mips*) + ;; + *) + BUILDFLAGS+=( "-buildmode=pie" ) + ;; +esac echo "Building: $DEST/$BINARY_FULLNAME" go build \