Browse code

-buildmode=pie is not supported on Linux on MIPS either

Signed-off-by: Kasper Fabæch Brandt <poizan@poizan.dk>

Kasper Fabæch Brandt authored on 2018/07/16 20:07:13
Showing 1 changed files
... ...
@@ -50,10 +50,14 @@ if [ "$(go env GOOS)/$(go env GOARCH)" != "$(go env GOHOSTOS)/$(go env GOHOSTARC
50 50
 	esac
51 51
 fi
52 52
 
53
-# -buildmode=pie is not supported on Windows.
54
-if [ "$(go env GOOS)" != "windows" ]; then
55
-	BUILDFLAGS+=( "-buildmode=pie" )
56
-fi
53
+# -buildmode=pie is not supported on Windows and Linux on mips.
54
+case "$(go env GOOS)/$(go env GOARCH)" in
55
+	windows/*|linux/mips*)
56
+		;;
57
+	*)
58
+		BUILDFLAGS+=( "-buildmode=pie" )
59
+		;;
60
+esac
57 61
 
58 62
 echo "Building: $DEST/$BINARY_FULLNAME"
59 63
 go build \