[meta-virtualization] [PATCH 2/2] runc: Use go-osarchmap to set GOARCH

Paul Barker paul at paulbarker.me.uk
Thu Jun 16 12:06:29 PDT 2016


When building for qemux86 the following error was encountered due to GOARCH
being set incorrectly:

    compile: unknown architecture "i586"

This can be fixed by using the go-osarchmap class.

Signed-off-by: Paul Barker <paul at paulbarker.me.uk>
---
 recipes-containers/runc/runc_git.bb | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/recipes-containers/runc/runc_git.bb b/recipes-containers/runc/runc_git.bb
index b47914e..955ea93 100644
--- a/recipes-containers/runc/runc_git.bb
+++ b/recipes-containers/runc/runc_git.bb
@@ -28,15 +28,10 @@ LIBCONTAINER_PACKAGE="github.com/opencontainers/runc/libcontainer"
 do_configure[noexec] = "1"
 EXTRA_OEMAKE="BUILDTAGS=''"
 
+inherit go-osarchmap
+
 do_compile() {
-	export GOARCH="${TARGET_ARCH}"
-	# supported amd64, 386, arm arm64
-	if [ "${TARGET_ARCH}" = "x86_64" ]; then
-		export GOARCH="amd64"
-	fi
-	if [ "${TARGET_ARCH}" = "aarch64" ]; then
-		export GOARCH="arm64"
-	fi
+	export GOARCH="${TARGET_GOARCH}"
 
 	# Set GOPATH. See 'PACKAGERS.md'. Don't rely on
 	# docker to download its dependencies but rather
-- 
2.1.4



More information about the meta-virtualization mailing list