소스 검색

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

Signed-off-by: Kasper Fabæch Brandt <poizan@poizan.dk>
Kasper Fabæch Brandt 7 년 전
부모
커밋
daba5daf4f
1개의 변경된 파일8개의 추가작업 그리고 4개의 파일을 삭제
  1. 8 4
      hack/make/.binary

+ 8 - 4
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 \