90 lines
2.9 KiB
Diff
90 lines
2.9 KiB
Diff
diff -ur kubernetes-1.25.3/hack/lib/golang.sh kubernetes-1.25.3/hack/lib/golang.sh
|
|
--- kubernetes-1.25.3/hack/lib/golang.sh 2023-07-28 16:07:07.873130748 +0800
|
|
+++ kubernetes-1.25.3/hack/lib/golang.sh 2023-07-28 17:02:01.192415345 +0800
|
|
@@ -27,6 +27,7 @@
|
|
linux/arm64
|
|
linux/s390x
|
|
linux/ppc64le
|
|
+ linux/riscv64
|
|
)
|
|
|
|
# The node platforms we build for
|
|
@@ -36,6 +37,7 @@
|
|
linux/arm64
|
|
linux/s390x
|
|
linux/ppc64le
|
|
+ linux/riscv64
|
|
windows/amd64
|
|
)
|
|
|
|
@@ -48,6 +50,7 @@
|
|
linux/arm64
|
|
linux/s390x
|
|
linux/ppc64le
|
|
+ linux/riscv64
|
|
darwin/amd64
|
|
darwin/arm64
|
|
windows/amd64
|
|
@@ -63,6 +66,7 @@
|
|
linux/arm64
|
|
linux/s390x
|
|
linux/ppc64le
|
|
+ linux/riscv64
|
|
darwin/amd64
|
|
darwin/arm64
|
|
windows/amd64
|
|
@@ -213,8 +217,8 @@
|
|
|
|
elif [[ "${KUBE_FASTBUILD:-}" == "true" ]]; then
|
|
host_arch=$(kube::util::host_arch)
|
|
- if [[ "${host_arch}" != "amd64" && "${host_arch}" != "arm64" && "${host_arch}" != "ppc64le" && "${host_arch}" != "s390x" ]]; then
|
|
- # on any platform other than amd64, arm64, ppc64le and s390x, we just default to amd64
|
|
+ if [[ "${host_arch}" != "amd64" && "${host_arch}" != "arm64" && "${host_arch}" != "ppc64le" && "${host_arch}" != "s390x" && "${host_arch}" != "riscv64" ]]; then
|
|
+ # on any platform other than amd64, arm64, ppc64le and s390x, riscv64, we just default to amd64
|
|
host_arch="amd64"
|
|
fi
|
|
KUBE_SERVER_PLATFORMS=("linux/${host_arch}")
|
|
@@ -444,6 +448,10 @@
|
|
export CGO_ENABLED=1
|
|
export CC=${KUBE_LINUX_S390X_CC:-s390x-linux-gnu-gcc}
|
|
;;
|
|
+ "linux/riscv64")
|
|
+ export CGO_ENABLED=1
|
|
+ export CC=${KUBE_LINUX_S390X_CC:-riscv64-linux-gnu-gcc}
|
|
+ ;;
|
|
esac
|
|
fi
|
|
|
|
diff -ur kubernetes-1.25.3/hack/lib/util.sh kubernetes-1.25.3/hack/lib/util.sh
|
|
--- kubernetes-1.25.3/hack/lib/util.sh 2022-10-12 18:47:25.000000000 +0800
|
|
+++ kubernetes-1.25.3/hack/lib/util.sh 2023-07-28 16:09:27.117412982 +0800
|
|
@@ -185,8 +185,11 @@
|
|
ppc64le*)
|
|
host_arch=ppc64le
|
|
;;
|
|
+ riscv64*)
|
|
+ host_arch=riscv64
|
|
+ ;;
|
|
*)
|
|
- kube::log::error "Unsupported host arch. Must be x86_64, 386, arm, arm64, s390x or ppc64le."
|
|
+ kube::log::error "Unsupported host arch. Must be x86_64, 386, arm, arm64, riscv64, s390x or ppc64le."
|
|
exit 1
|
|
;;
|
|
esac
|
|
diff -ur kubernetes-1.25.3/hack/local-up-cluster.sh kubernetes-1.25.3/hack/local-up-cluster.sh
|
|
--- kubernetes-1.25.3/hack/local-up-cluster.sh 2022-10-12 18:47:25.000000000 +0800
|
|
+++ kubernetes-1.25.3/hack/local-up-cluster.sh 2023-07-28 16:08:57.429352807 +0800
|
|
@@ -316,8 +316,11 @@
|
|
ppc64le*)
|
|
host_arch=ppc64le
|
|
;;
|
|
+ riscv64*)
|
|
+ host_arch=riscv64
|
|
+ ;;
|
|
*)
|
|
- echo "Unsupported host arch. Must be x86_64, 386, arm, arm64, s390x or ppc64le." >&2
|
|
+ echo "Unsupported host arch. Must be x86_64, 386, arm, arm64, riscv64, s390x or ppc64le." >&2
|
|
exit 1
|
|
;;
|
|
esac
|