[OE-core] [PATCH 3/4] go: Fix go cross build with rss

Khem Raj raj.khem at gmail.com
Sat Feb 25 18:13:13 UTC 2017


recipe specific sysroot demanded changes how cross go compiler was built
rename PN to include ARCH_NAME for cross recipe

Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 meta/classes/go.bbclass                  |  2 +-
 meta/recipes-devtools/go/go-cross.inc    | 10 ++++++++++
 meta/recipes-devtools/go/go-cross_1.7.bb |  5 +++++
 meta/recipes-devtools/go/go_1.7.bb       |  2 --
 4 files changed, 16 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-devtools/go/go-cross.inc
 create mode 100644 meta/recipes-devtools/go/go-cross_1.7.bb

diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index e10864d99b..293194d39a 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -21,7 +21,7 @@ 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"
+DEPENDS += "go-cross-${TARGET_ARCH}"
 DEPENDS_class-native += "go-native"
 
 INHIBIT_PACKAGE_STRIP = "1"
diff --git a/meta/recipes-devtools/go/go-cross.inc b/meta/recipes-devtools/go/go-cross.inc
new file mode 100644
index 0000000000..fa9c339b93
--- /dev/null
+++ b/meta/recipes-devtools/go/go-cross.inc
@@ -0,0 +1,10 @@
+inherit cross
+
+DEPENDS += "gcc-cross-${TARGET_ARCH}"
+
+PN = "go-cross-${TARGET_ARCH}"
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/go-cross:"
+
+GOROOT_FINAL ="${libdir}/go"
+export GOROOT_FINAL
diff --git a/meta/recipes-devtools/go/go-cross_1.7.bb b/meta/recipes-devtools/go/go-cross_1.7.bb
new file mode 100644
index 0000000000..56ee084b10
--- /dev/null
+++ b/meta/recipes-devtools/go/go-cross_1.7.bb
@@ -0,0 +1,5 @@
+require go-cross.inc
+require go_${PV}.bb
+
+# Go binaries are not understood by the strip tool.
+INHIBIT_SYSROOT_STRIP = "1"
diff --git a/meta/recipes-devtools/go/go_1.7.bb b/meta/recipes-devtools/go/go_1.7.bb
index 8186427933..e7a6ab277e 100644
--- a/meta/recipes-devtools/go/go_1.7.bb
+++ b/meta/recipes-devtools/go/go_1.7.bb
@@ -1,4 +1,2 @@
 require go-${PV}.inc
 require go.inc
-
-BBCLASSEXTEND = "cross"
-- 
2.11.1




More information about the Openembedded-core mailing list