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>2017-01-03 10:29:24 -0500
commitf430ad9e5a5b9f53cbf14ddbdead44c840e0996d (patch)
tree62cb7858b1aeb667a84666c5ce30a7543be15a8e
parent6706ce690c23a5f57caf8374c81d33389b9245a8 (diff)
downloadmeta-virtualization-f430ad9e5a5b9f53cbf14ddbdead44c840e0996d.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 37df3c4c..d163b137 100644
--- a/recipes-containers/docker/docker_git.bb
+++ b/recipes-containers/docker/docker_git.bb
@@ -66,14 +66,29 @@ DOCKER_PKG="github.com/docker/docker"
66do_configure[noexec] = "1" 66do_configure[noexec] = "1"
67 67
68do_compile() { 68do_compile() {
69 export GOARCH="${TARGET_ARCH}" 69 case "${TARGET_ARCH}" in
70 # supported amd64, 386, arm arm64 70 arm)
71 if [ "${TARGET_ARCH}" = "x86_64" ]; then 71 GOARCH=arm
72 export GOARCH="amd64" 72 case "${TUNE_PKGARCH}" in
73 fi 73 cortexa*)
74 if [ "${TARGET_ARCH}" = "aarch64" ]; then 74 export GOARM=7
75 export GOARCH="arm64" 75 ;;
76 fi 76 esac
77 ;;
78 aarch64)
79 GOARCH=arm64
80 ;;
81 i586|i686)
82 GOARCH=386
83 ;;
84 x86_64)
85 GOARCH=amd64
86 ;;
87 *)
88 GOARCH="${TARGET_ARCH}"
89 ;;
90 esac
91 export GOARCH
77 92
78 # Set GOPATH. See 'PACKAGERS.md'. Don't rely on 93 # Set GOPATH. See 'PACKAGERS.md'. Don't rely on
79 # docker to download its dependencies but rather 94 # docker to download its dependencies but rather