[3/4] go: Fix go cross build with rss

Message ID 90844974c128323bc5fd7fdda850b2f3f2f83a1c.1488046239.git.raj.khem@gmail.com
State New
Headers show
Series
  • Add golang basic infrastructure
Related show

Commit Message

Khem Raj Feb. 25, 2017, 6:13 p.m.
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@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

-- 
2.11.1

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Patch hide | download patch | download mbox

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"