summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-devtools/go-cross/go-cross.inc10
1 files changed, 9 insertions, 1 deletions
diff --git a/recipes-devtools/go-cross/go-cross.inc b/recipes-devtools/go-cross/go-cross.inc
index 613e9c7c..6363a789 100644
--- a/recipes-devtools/go-cross/go-cross.inc
+++ b/recipes-devtools/go-cross/go-cross.inc
@@ -2,6 +2,10 @@ inherit cross
2 2
3DEPENDS += "go-native" 3DEPENDS += "go-native"
4 4
5# Prevent runstrip from running because you get errors when the host arch != target arch
6#INHIBIT_PACKAGE_STRIP = "1"
7STRIP = "echo"
8
5export GOHOSTOS = "${BUILD_GOOS}" 9export GOHOSTOS = "${BUILD_GOOS}"
6export GOHOSTARCH = "${BUILD_GOARCH}" 10export GOHOSTARCH = "${BUILD_GOARCH}"
7export GOOS = "${TARGET_GOOS}" 11export GOOS = "${TARGET_GOOS}"
@@ -26,6 +30,8 @@ do_compile() {
26 30
27 cd src 31 cd src
28 ./make.bash --host-only 32 ./make.bash --host-only
33 # Ensure cgo.a is built with the target toolchain
34 GO_FLAGS="-a" ./make.bash --target-only
29} 35}
30 36
31do_install() { 37do_install() {
@@ -38,7 +44,9 @@ do_install() {
38 install -d ${D}${bindir} 44 install -d ${D}${bindir}
39 for f in ${B}/bin/* 45 for f in ${B}/bin/*
40 do 46 do
41 install -m755 $f ${D}${bindir} 47 if [ ! -d "$f" ] ; then
48 install -m755 $f ${D}${bindir}
49 fi
42 done 50 done
43} 51}
44 52