aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Madison <matt@madison.systems>2017-09-12 09:50:27 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-12 23:51:37 +0100
commit1d319f102cd1f37ce5629c73948efae01478f866 (patch)
tree86aebf33f730ec3d69cb5d5bcdcd5061ef3fa228
parent780aa334f8614c80ce5b9cb77b0cea2fcd482614 (diff)
downloadopenembedded-core-contrib-1d319f102cd1f37ce5629c73948efae01478f866.tar.gz
go-cross: take GOARM environment setting
Instead of hard-coding GOARM to ${TARGET_GOARM} in the wrapper script, take it from an existing environment setting if present. This allows the same cross-compiler to be used for different ARM targets. 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>
-rw-r--r--meta/recipes-devtools/go/go-cross.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-devtools/go/go-cross.inc b/meta/recipes-devtools/go/go-cross.inc
index df3e4ea914..d18d9613ff 100644
--- a/meta/recipes-devtools/go/go-cross.inc
+++ b/meta/recipes-devtools/go/go-cross.inc
@@ -36,7 +36,7 @@ make_wrapper() {
here=\`dirname \$0\`
export GOARCH="${TARGET_GOARCH}"
export GOOS="${TARGET_GOOS}"
-export GOARM="${TARGET_GOARM}"
+export GOARM="\${GOARM:-${TARGET_GOARM}}"
\$here/../../lib/${CROSS_TARGET_SYS_DIR}/go/bin/$1 "\$@"
END
chmod +x ${D}${bindir}/$2