1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 05:29:32 +00:00

go.bbclass: Use an auxiliary variable to add the build dependencies

This is going to easy the addition of nativesdk and virtual providers
in the future.

This change is based on the meta-golang[1] layer. Thanks to Matt
Madison <matt@madison.systems> for his work on this.

1. https://github.com/madisongh/meta-golang

(From OE-Core rev: 497136297f15858903b5170a8616d0cb427a995d)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Otavio Salvador
2017-09-08 18:04:39 -03:00
committed by Richard Purdie
parent 2381d15cc6
commit f01000da80
+5 -3
View File
@@ -24,6 +24,11 @@ GOROOT = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
GOBIN_FINAL_class-native = "${GOROOT_FINAL}/bin"
GOBIN_FINAL = "${GOROOT_FINAL}/${GO_BUILD_BINDIR}"
DEPENDS_GOLANG_class-target = "go-cross-${TARGET_ARCH}"
DEPENDS_GOLANG_class-native = "go-native"
DEPENDS_append = " ${DEPENDS_GOLANG}"
export GOBUILDFLAGS ?= "-v"
GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} "
@@ -43,9 +48,6 @@ export CGO_CPPFLAGS = "${TARGET_CPPFLAGS}"
export CGO_CXXFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_CXXFLAGS}"
export CGO_LDFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_LDFLAGS}"
DEPENDS += "go-cross-${TARGET_ARCH}"
DEPENDS_class-native += "go-native"
FILES_${PN}-staticdev += "${GOSRC_FINAL}/${GO_IMPORT}"
FILES_${PN}-staticdev += "${GOPKG_FINAL}/${GO_IMPORT}*"