Forráskód Böngészése

Merge pull request #37489 from poizan42/fix-mips-no-pie

-buildmode=pie is not supported on Linux on MIPS either
Tibor Vass 7 éve
szülő
commit
724c5f317e
1 módosított fájl, 8 hozzáadás és 4 törlés
  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
 	esac
 fi
 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"
 echo "Building: $DEST/$BINARY_FULLNAME"
 go build \
 go build \