[gnome-continuous-yocto/gnomeostree-3.28-rocko: 7669/8267] go.bbclass: clean up CGO_xxx settings
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 7669/8267] go.bbclass: clean up CGO_xxx settings
- Date: Sun, 17 Dec 2017 06:34:21 +0000 (UTC)
commit 4c6ce2b64763e0f586f198c03644befa55017396
Author: Matt Madison <matt@madison.systems>
Date: Tue Sep 12 09:50:25 2017 -0300
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>
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 c0b117d..8fb41e5 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -21,6 +21,7 @@ GO_PARALLEL_BUILD ?= "${@get_go_parallel_make(d)}"
GOROOT_class-native = "${STAGING_LIBDIR_NATIVE}/go"
GOROOT = "${STAGING_LIBDIR}/go"
+export GOROOT
export GOROOT_FINAL = "${libdir}/go"
DEPENDS_GOLANG_class-target = "virtual/${TARGET_PREFIX}go virtual/${TARGET_PREFIX}go-runtime"
@@ -35,12 +36,12 @@ export GO = "${HOST_PREFIX}go"
GOTOOLDIR = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go/pkg/tool/${BUILD_GOTUPLE}"
GOTOOLDIR_class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}"
export GOTOOLDIR
-export CGO_ENABLED = "1"
-export GOROOT
-export CGO_CFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_CFLAGS}"
-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}"
+
+export CGO_ENABLED ?= "1"
+export CGO_CFLAGS ?= "${CFLAGS}"
+export CGO_CPPFLAGS ?= "${CPPFLAGS}"
+export CGO_CXXFLAGS ?= "${CXXFLAGS}"
+export CGO_LDFLAGS ?= "${LDFLAGS}"
GO_INSTALL ?= "${GO_IMPORT}/..."
GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]