diff options
| -rw-r--r-- | recipes-containers/kubernetes/kubernetes/0001-hack-lib-golang.sh-use-CC-from-environment.patch | 40 | ||||
| -rw-r--r-- | recipes-containers/kubernetes/kubernetes_git.bb | 6 |
2 files changed, 44 insertions, 2 deletions
diff --git a/recipes-containers/kubernetes/kubernetes/0001-hack-lib-golang.sh-use-CC-from-environment.patch b/recipes-containers/kubernetes/kubernetes/0001-hack-lib-golang.sh-use-CC-from-environment.patch new file mode 100644 index 00000000..62d05210 --- /dev/null +++ b/recipes-containers/kubernetes/kubernetes/0001-hack-lib-golang.sh-use-CC-from-environment.patch | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | From 9cbb2d523d481053d405ebac830c2074b00d3417 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Koen Kooi <koen.kooi@linaro.org> | ||
| 3 | Date: Mon, 23 Jul 2018 15:28:02 +0200 | ||
| 4 | Subject: [PATCH] hack/lib/golang.sh: use CC from environment | ||
| 5 | |||
| 6 | Toolchain tupples differs, especially when using vendor provides ones. | ||
| 7 | |||
| 8 | Upstream-status: Inappropriate [embedded specific] | ||
| 9 | Signed-off-by: Koen Kooi <koen.kooi@linaro.org> | ||
| 10 | --- | ||
| 11 | hack/lib/golang.sh | 4 ---- | ||
| 12 | 1 file changed, 4 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh | ||
| 15 | index c5d4634..563e2b4b 100755 | ||
| 16 | --- a/src/import/hack/lib/golang.sh | ||
| 17 | +++ b/src/import/hack/lib/golang.sh | ||
| 18 | @@ -278,19 +278,15 @@ kube::golang::set_platform_envs() { | ||
| 19 | case "${platform}" in | ||
| 20 | "linux/arm") | ||
| 21 | export CGO_ENABLED=1 | ||
| 22 | - export CC=arm-linux-gnueabihf-gcc | ||
| 23 | ;; | ||
| 24 | "linux/arm64") | ||
| 25 | export CGO_ENABLED=1 | ||
| 26 | - export CC=aarch64-linux-gnu-gcc | ||
| 27 | ;; | ||
| 28 | "linux/ppc64le") | ||
| 29 | export CGO_ENABLED=1 | ||
| 30 | - export CC=powerpc64le-linux-gnu-gcc | ||
| 31 | ;; | ||
| 32 | "linux/s390x") | ||
| 33 | export CGO_ENABLED=1 | ||
| 34 | - export CC=s390x-linux-gnu-gcc | ||
| 35 | ;; | ||
| 36 | esac | ||
| 37 | fi | ||
| 38 | -- | ||
| 39 | 2.9.5 | ||
| 40 | |||
diff --git a/recipes-containers/kubernetes/kubernetes_git.bb b/recipes-containers/kubernetes/kubernetes_git.bb index 10558ef9..33cb9338 100644 --- a/recipes-containers/kubernetes/kubernetes_git.bb +++ b/recipes-containers/kubernetes/kubernetes_git.bb | |||
| @@ -7,6 +7,7 @@ maintenance, and scaling of applications. \ | |||
| 7 | 7 | ||
| 8 | SRCREV_kubernetes = "210c9cd7e1782e9fe46938fe0368556f2166a528" | 8 | SRCREV_kubernetes = "210c9cd7e1782e9fe46938fe0368556f2166a528" |
| 9 | SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=release-1.11;name=kubernetes \ | 9 | SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=release-1.11;name=kubernetes \ |
| 10 | file://0001-hack-lib-golang.sh-use-CC-from-environment.patch \ | ||
| 10 | " | 11 | " |
| 11 | 12 | ||
| 12 | DEPENDS += "rsync-native \ | 13 | DEPENDS += "rsync-native \ |
| @@ -46,6 +47,7 @@ inherit goarch | |||
| 46 | 47 | ||
| 47 | do_compile() { | 48 | do_compile() { |
| 48 | export GOARCH="${TARGET_GOARCH}" | 49 | export GOARCH="${TARGET_GOARCH}" |
| 50 | export GOOS="${TARGET_GOOS}" | ||
| 49 | export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" | 51 | export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" |
| 50 | export GOPATH="${S}/src/import:${S}/src/import/vendor" | 52 | export GOPATH="${S}/src/import:${S}/src/import/vendor" |
| 51 | 53 | ||
| @@ -72,7 +74,7 @@ do_compile() { | |||
| 72 | 74 | ||
| 73 | cd ${S}/src/import | 75 | cd ${S}/src/import |
| 74 | # to limit what is built, use 'WHAT', i.e. make WHAT=cmd/kubelet | 76 | # to limit what is built, use 'WHAT', i.e. make WHAT=cmd/kubelet |
| 75 | make all | 77 | make cross KUBE_BUILD_PLATFORMS=${GOOS}/${GOARCH} |
| 76 | } | 78 | } |
| 77 | 79 | ||
| 78 | do_install() { | 80 | do_install() { |
| @@ -82,7 +84,7 @@ do_install() { | |||
| 82 | 84 | ||
| 83 | install -d ${D}${sysconfdir}/kubernetes/manifests/ | 85 | install -d ${D}${sysconfdir}/kubernetes/manifests/ |
| 84 | 86 | ||
| 85 | install -m 755 -D ${S}/src/import/_output/bin/kube* ${D}/${bindir} | 87 | install -m 755 -D ${S}/src/import/_output/local/bin/${TARGET_GOOS}/${TARGET_GOARCH}/* ${D}/${bindir} |
| 86 | 88 | ||
| 87 | install -m 0644 ${S}/src/import/build/debs/kubelet.service ${D}${systemd_unitdir}/system/ | 89 | install -m 0644 ${S}/src/import/build/debs/kubelet.service ${D}${systemd_unitdir}/system/ |
| 88 | install -m 0644 ${S}/src/import/build/debs/10-kubeadm.conf ${D}${systemd_unitdir}/system/kubelet.service.d/ | 90 | install -m 0644 ${S}/src/import/build/debs/10-kubeadm.conf ${D}${systemd_unitdir}/system/kubelet.service.d/ |
