summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2016-12-20 11:25:34 +0200
committerBruce Ashfield <bruce.ashfield@windriver.com>2016-12-21 09:17:05 -0500
commit2307ad473adbfc75d7b56ea34232717459737b63 (patch)
treee6a23c0fb6b0643e4d3b3278d6286a2827c49f25
parent629b6bb64b0e0aa9c55b0716860a652fa7c6eb0a (diff)
downloadmeta-virtualization-2307ad473adbfc75d7b56ea34232717459737b63.tar.gz
docker: use a switch to set GOARCH based on TARGET_ARCH value
It allows to: * easily extend future architecture added/supported * tune arm architecture and set GOARM as appropriate Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--recipes-containers/docker/docker_git.bb31
1 files changed, 23 insertions, 8 deletions
diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb
index 2d27c628..7b12ec24 100644
--- a/recipes-containers/docker/docker_git.bb
+++ b/recipes-containers/docker/docker_git.bb
@@ -64,14 +64,29 @@ DOCKER_PKG="github.com/docker/docker"
64do_configure[noexec] = "1" 64do_configure[noexec] = "1"
65 65
66do_compile() { 66do_compile() {
67 export GOARCH="${TARGET_ARCH}" 67 case "${TARGET_ARCH}" in
68 # supported amd64, 386, arm arm64 68 arm)
69 if [ "${TARGET_ARCH}" = "x86_64" ]; then 69 GOARCH=arm
70 export GOARCH="amd64" 70 case "${TUNE_PKGARCH}" in
71 fi 71 cortexa*)
72 if [ "${TARGET_ARCH}" = "aarch64" ]; then 72 export GOARM=7
73 export GOARCH="arm64" 73 ;;
74 fi 74 esac
75 ;;
76 aarch64)
77 GOARCH=arm64
78 ;;
79 i586|i686)
80 GOARCH=386
81 ;;
82 x86_64)
83 GOARCH=amd64
84 ;;
85 *)
86 GOARCH="${TARGET_ARCH}"
87 ;;
88 esac
89 export GOARCH
75 90
76 # Set GOPATH. See 'PACKAGERS.md'. Don't rely on 91 # Set GOPATH. See 'PACKAGERS.md'. Don't rely on
77 # docker to download its dependencies but rather 92 # docker to download its dependencies but rather