diff options
| -rw-r--r-- | recipes-containers/kubernetes/kubernetes_git.bb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/recipes-containers/kubernetes/kubernetes_git.bb b/recipes-containers/kubernetes/kubernetes_git.bb index 33cb9338..f23721c2 100644 --- a/recipes-containers/kubernetes/kubernetes_git.bb +++ b/recipes-containers/kubernetes/kubernetes_git.bb | |||
| @@ -73,6 +73,12 @@ do_compile() { | |||
| 73 | export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" | 73 | export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" |
| 74 | 74 | ||
| 75 | cd ${S}/src/import | 75 | cd ${S}/src/import |
| 76 | # Build the host tools first, using the host compiler | ||
| 77 | export GOARCH="${BUILD_GOARCH}" | ||
| 78 | make generated_files KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${BUILD_GOARCH}" | ||
| 79 | |||
| 80 | # Reset GOARCH to the target one | ||
| 81 | export GOARCH="${TARGET_GOARCH}" | ||
| 76 | # to limit what is built, use 'WHAT', i.e. make WHAT=cmd/kubelet | 82 | # to limit what is built, use 'WHAT', i.e. make WHAT=cmd/kubelet |
| 77 | make cross KUBE_BUILD_PLATFORMS=${GOOS}/${GOARCH} | 83 | make cross KUBE_BUILD_PLATFORMS=${GOOS}/${GOARCH} |
| 78 | } | 84 | } |
