diff options
author | Matt Madison <matt@madison.systems> | 2017-09-12 09:50:25 -0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-12 23:55:29 +0100 |
commit | 4c6ce2b64763e0f586f198c03644befa55017396 (patch) | |
tree | d2b518a3bd5116ddad06ea964c1aba4240793727 | |
parent | 6128573e237285a01be011afdbcdf0fbfeee1610 (diff) | |
download | poky-4c6ce2b64763e0f586f198c03644befa55017396.tar.gz |
go.bbclass: clean up CGO_xxx settings
* use conditional assignment for the CGO_xxx
variables, so they can be overridden more easily
* remove the TOOLCHAIN_OPTIONS and TARGET_CC_ARCH
references, since those are already present in
CC and CXX
* remove the TARGET_ prefix so the values are
appropriate for native, nativesdk, etc. builds
* move the GOROOT export away from the CGO settings
and closer to its definition
(From OE-Core rev: 088528021d6979a8e2d6bc33d63a166e300cfde4)
Signed-off-by: Matt Madison <matt@madison.systems>
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 | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index c0b117d155..8fb41e5c09 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass | |||
@@ -21,6 +21,7 @@ GO_PARALLEL_BUILD ?= "${@get_go_parallel_make(d)}" | |||
21 | 21 | ||
22 | GOROOT_class-native = "${STAGING_LIBDIR_NATIVE}/go" | 22 | GOROOT_class-native = "${STAGING_LIBDIR_NATIVE}/go" |
23 | GOROOT = "${STAGING_LIBDIR}/go" | 23 | GOROOT = "${STAGING_LIBDIR}/go" |
24 | export GOROOT | ||
24 | export GOROOT_FINAL = "${libdir}/go" | 25 | export GOROOT_FINAL = "${libdir}/go" |
25 | 26 | ||
26 | DEPENDS_GOLANG_class-target = "virtual/${TARGET_PREFIX}go virtual/${TARGET_PREFIX}go-runtime" | 27 | DEPENDS_GOLANG_class-target = "virtual/${TARGET_PREFIX}go virtual/${TARGET_PREFIX}go-runtime" |
@@ -35,12 +36,12 @@ export GO = "${HOST_PREFIX}go" | |||
35 | GOTOOLDIR = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go/pkg/tool/${BUILD_GOTUPLE}" | 36 | GOTOOLDIR = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go/pkg/tool/${BUILD_GOTUPLE}" |
36 | GOTOOLDIR_class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}" | 37 | GOTOOLDIR_class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}" |
37 | export GOTOOLDIR | 38 | export GOTOOLDIR |
38 | export CGO_ENABLED = "1" | 39 | |
39 | export GOROOT | 40 | export CGO_ENABLED ?= "1" |
40 | export CGO_CFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_CFLAGS}" | 41 | export CGO_CFLAGS ?= "${CFLAGS}" |
41 | export CGO_CPPFLAGS = "${TARGET_CPPFLAGS}" | 42 | export CGO_CPPFLAGS ?= "${CPPFLAGS}" |
42 | export CGO_CXXFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_CXXFLAGS}" | 43 | export CGO_CXXFLAGS ?= "${CXXFLAGS}" |
43 | export CGO_LDFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_LDFLAGS}" | 44 | export CGO_LDFLAGS ?= "${LDFLAGS}" |
44 | 45 | ||
45 | GO_INSTALL ?= "${GO_IMPORT}/..." | 46 | GO_INSTALL ?= "${GO_IMPORT}/..." |
46 | GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/" | 47 | GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/" |