diff options
-rw-r--r-- | recipes-devtools/go-cross/go-cross.inc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/recipes-devtools/go-cross/go-cross.inc b/recipes-devtools/go-cross/go-cross.inc index 613e9c7c..181f4aad 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 | ||
3 | DEPENDS += "go-native" | 3 | DEPENDS += "go-native" |
4 | 4 | ||
5 | # Prevent runstrip from running because you get errors when the host arch != target arch | ||
6 | #INHIBIT_PACKAGE_STRIP = "1" | ||
7 | STRIP = "echo" | ||
8 | |||
5 | export GOHOSTOS = "${BUILD_GOOS}" | 9 | export GOHOSTOS = "${BUILD_GOOS}" |
6 | export GOHOSTARCH = "${BUILD_GOARCH}" | 10 | export GOHOSTARCH = "${BUILD_GOARCH}" |
7 | export GOOS = "${TARGET_GOOS}" | 11 | export GOOS = "${TARGET_GOOS}" |
@@ -26,6 +30,11 @@ 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 | export GOBIN="${B}/target/bin" | ||
35 | rm -rf ${GOBIN} | ||
36 | mkdir -p ${GOBIN} | ||
37 | GO_FLAGS="-a" ./make.bash | ||
29 | } | 38 | } |
30 | 39 | ||
31 | do_install() { | 40 | do_install() { |