diff options
Diffstat (limited to 'poky/meta/classes/go.bbclass')
-rw-r--r-- | poky/meta/classes/go.bbclass | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/poky/meta/classes/go.bbclass b/poky/meta/classes/go.bbclass index 7069c5fec..b6d9372c5 100644 --- a/poky/meta/classes/go.bbclass +++ b/poky/meta/classes/go.bbclass @@ -8,6 +8,23 @@ GOROOT = "${STAGING_LIBDIR}/go" export GOROOT export GOROOT_FINAL = "${libdir}/go" +export GOARCH = "${TARGET_GOARCH}" +export GOOS = "${TARGET_GOOS}" +export GOHOSTARCH="${BUILD_GOARCH}" +export GOHOSTOS="${BUILD_GOOS}" + +GOARM[export] = "0" +GOARM_arm_class-target = "${TARGET_GOARM}" +GOARM_arm_class-target[export] = "1" + +GO386[export] = "0" +GO386_x86_class-target = "${TARGET_GO386}" +GO386_x86_class-target[export] = "1" + +GOMIPS[export] = "0" +GOMIPS_mips_class-target = "${TARGET_GOMIPS}" +GOMIPS_mips_class-target[export] = "1" + DEPENDS_GOLANG_class-target = "virtual/${TUNE_PKGARCH}-go virtual/${TARGET_PREFIX}go-runtime" DEPENDS_GOLANG_class-native = "go-native" DEPENDS_GOLANG_class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk virtual/${TARGET_PREFIX}go-runtime" @@ -113,7 +130,7 @@ go_do_install() { install -d ${D}${libdir}/go/src/${GO_IMPORT} tar -C ${S}/src/${GO_IMPORT} -cf - --exclude-vcs --exclude '*.test' --exclude 'testdata' . | \ tar -C ${D}${libdir}/go/src/${GO_IMPORT} --no-same-owner -xf - - tar -C ${B} -cf - pkg | tar -C ${D}${libdir}/go --no-same-owner -xf - + tar -C ${B} -cf - --exclude-vcs pkg | tar -C ${D}${libdir}/go --no-same-owner -xf - if [ -n "`ls ${B}/${GO_BUILD_BINDIR}/`" ]; then install -d ${D}${bindir} |