[v8,09/13] go-cross: take GOARM environment setting

Submitted by Otavio Salvador on Sept. 12, 2017, 12:50 p.m. | Patch ID: 144014


Message ID 20170912125031.4009-10-otavio@ossystems.com.br
State New
Headers show

Commit Message

Otavio Salvador Sept. 12, 2017, 12:50 p.m.
From: Matt Madison <matt@madison.systems>

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

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>

Changes in v8: None
Changes in v7: None
Changes in v6:
- new patch

 meta/recipes-devtools/go/go-cross.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

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 GOOS="${TARGET_GOOS}"
+export GOARM="\${GOARM:-${TARGET_GOARM}}"
 \$here/../../lib/${CROSS_TARGET_SYS_DIR}/go/bin/$1 "\$@"
     chmod +x ${D}${bindir}/$2