diff options
author | Aníbal Limón <anibal.limon@linaro.org> | 2017-10-06 12:25:48 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-10-09 12:38:45 -0400 |
commit | 89a1121656aaf04966b79756c6967f7a5ada02d5 (patch) | |
tree | 90e57af714b5fceade25df16e8a989eaac3c4584 | |
parent | 1f99ba19c8e54b11b77748db890c0b72eae86ba9 (diff) | |
download | meta-virtualization-89a1121656aaf04966b79756c6967f7a5ada02d5.tar.gz |
docker/containerd: Export GOARCH to fix build in arm64
If the GOARCH isn't set CGO took the ARCH from the host and tries
to use -m64 flag that isn't available in aarch64 compiler.
...
| # github.com/opencontainers/runc/libcontainer/system
| aarch64-linaro-linux-gcc: error: unrecognized command line option
'-m64'
| # github.com/containerd/console
| aarch64-linaro-linux-gcc: error: unrecognized command line option
'-m64'
| Makefile:60: recipe for target 'shim-static' failed
...
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r-- | recipes-containers/containerd/containerd.inc | 1 | ||||
-rw-r--r-- | recipes-containers/docker/docker_git.bb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/recipes-containers/containerd/containerd.inc b/recipes-containers/containerd/containerd.inc index 18d9188e..e7a37192 100644 --- a/recipes-containers/containerd/containerd.inc +++ b/recipes-containers/containerd/containerd.inc | |||
@@ -38,6 +38,7 @@ do_compile() { | |||
38 | 38 | ||
39 | # Pass the needed cflags/ldflags so that cgo | 39 | # Pass the needed cflags/ldflags so that cgo |
40 | # can find the needed headers files and libraries | 40 | # can find the needed headers files and libraries |
41 | export GOARCH="${TARGET_GOARCH}" | ||
41 | export CGO_ENABLED="1" | 42 | export CGO_ENABLED="1" |
42 | export CFLAGS="" | 43 | export CFLAGS="" |
43 | export LDFLAGS="" | 44 | export LDFLAGS="" |
diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb index 4d6c17c9..4ba5e817 100644 --- a/recipes-containers/docker/docker_git.bb +++ b/recipes-containers/docker/docker_git.bb | |||
@@ -97,6 +97,7 @@ do_compile() { | |||
97 | 97 | ||
98 | # Pass the needed cflags/ldflags so that cgo | 98 | # Pass the needed cflags/ldflags so that cgo |
99 | # can find the needed headers files and libraries | 99 | # can find the needed headers files and libraries |
100 | export GOARCH=${TARGET_GOARCH} | ||
100 | export CGO_ENABLED="1" | 101 | export CGO_ENABLED="1" |
101 | export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}" | 102 | export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}" |
102 | export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" | 103 | export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" |