diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2017-09-08 18:04:39 -0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-11 17:30:30 +0100 |
commit | f01000da80d40e344f33c60c788d36dbb966af36 (patch) | |
tree | 078dbb79df3489b5a72003d73db0df694e040622 | |
parent | 2381d15cc62a7ada15d9f8af39a0d32701282c3b (diff) | |
download | poky-f01000da80d40e344f33c60c788d36dbb966af36.tar.gz |
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>
-rw-r--r-- | meta/classes/go.bbclass | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index 6df73bf377..82b5f83aa0 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass | |||
@@ -24,6 +24,11 @@ GOROOT = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" | |||
24 | GOBIN_FINAL_class-native = "${GOROOT_FINAL}/bin" | 24 | GOBIN_FINAL_class-native = "${GOROOT_FINAL}/bin" |
25 | GOBIN_FINAL = "${GOROOT_FINAL}/${GO_BUILD_BINDIR}" | 25 | GOBIN_FINAL = "${GOROOT_FINAL}/${GO_BUILD_BINDIR}" |
26 | 26 | ||
27 | DEPENDS_GOLANG_class-target = "go-cross-${TARGET_ARCH}" | ||
28 | DEPENDS_GOLANG_class-native = "go-native" | ||
29 | |||
30 | DEPENDS_append = " ${DEPENDS_GOLANG}" | ||
31 | |||
27 | export GOBUILDFLAGS ?= "-v" | 32 | export GOBUILDFLAGS ?= "-v" |
28 | GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} " | 33 | GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} " |
29 | 34 | ||
@@ -43,9 +48,6 @@ export CGO_CPPFLAGS = "${TARGET_CPPFLAGS}" | |||
43 | export CGO_CXXFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_CXXFLAGS}" | 48 | export CGO_CXXFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_CXXFLAGS}" |
44 | export CGO_LDFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_LDFLAGS}" | 49 | export CGO_LDFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_LDFLAGS}" |
45 | 50 | ||
46 | DEPENDS += "go-cross-${TARGET_ARCH}" | ||
47 | DEPENDS_class-native += "go-native" | ||
48 | |||
49 | FILES_${PN}-staticdev += "${GOSRC_FINAL}/${GO_IMPORT}" | 51 | FILES_${PN}-staticdev += "${GOSRC_FINAL}/${GO_IMPORT}" |
50 | FILES_${PN}-staticdev += "${GOPKG_FINAL}/${GO_IMPORT}*" | 52 | FILES_${PN}-staticdev += "${GOPKG_FINAL}/${GO_IMPORT}*" |
51 | 53 | ||