summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Madison <matt@madison.systems>2017-09-12 09:50:25 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-12 23:55:29 +0100
commit4c6ce2b64763e0f586f198c03644befa55017396 (patch)
treed2b518a3bd5116ddad06ea964c1aba4240793727
parent6128573e237285a01be011afdbcdf0fbfeee1610 (diff)
downloadpoky-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.bbclass13
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
22GOROOT_class-native = "${STAGING_LIBDIR_NATIVE}/go" 22GOROOT_class-native = "${STAGING_LIBDIR_NATIVE}/go"
23GOROOT = "${STAGING_LIBDIR}/go" 23GOROOT = "${STAGING_LIBDIR}/go"
24export GOROOT
24export GOROOT_FINAL = "${libdir}/go" 25export GOROOT_FINAL = "${libdir}/go"
25 26
26DEPENDS_GOLANG_class-target = "virtual/${TARGET_PREFIX}go virtual/${TARGET_PREFIX}go-runtime" 27DEPENDS_GOLANG_class-target = "virtual/${TARGET_PREFIX}go virtual/${TARGET_PREFIX}go-runtime"
@@ -35,12 +36,12 @@ export GO = "${HOST_PREFIX}go"
35GOTOOLDIR = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go/pkg/tool/${BUILD_GOTUPLE}" 36GOTOOLDIR = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go/pkg/tool/${BUILD_GOTUPLE}"
36GOTOOLDIR_class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}" 37GOTOOLDIR_class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}"
37export GOTOOLDIR 38export GOTOOLDIR
38export CGO_ENABLED = "1" 39
39export GOROOT 40export CGO_ENABLED ?= "1"
40export CGO_CFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_CFLAGS}" 41export CGO_CFLAGS ?= "${CFLAGS}"
41export CGO_CPPFLAGS = "${TARGET_CPPFLAGS}" 42export CGO_CPPFLAGS ?= "${CPPFLAGS}"
42export CGO_CXXFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_CXXFLAGS}" 43export CGO_CXXFLAGS ?= "${CXXFLAGS}"
43export CGO_LDFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_LDFLAGS}" 44export CGO_LDFLAGS ?= "${LDFLAGS}"
44 45
45GO_INSTALL ?= "${GO_IMPORT}/..." 46GO_INSTALL ?= "${GO_IMPORT}/..."
46GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/" 47GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/"