]> code.ossystems Code Review - openembedded-core.git/commitdiff
go-cross: take GOARM environment setting
authorMatt Madison <matt@madison.systems>
Tue, 12 Sep 2017 12:50:27 +0000 (09:50 -0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 12 Sep 2017 22:51:37 +0000 (23:51 +0100)
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>
meta/recipes-devtools/go/go-cross.inc

index df3e4ea9145563cea0be46c56addbe415098e1fb..d18d9613ff736e5dc0f24d3d627d5c2539f18c71 100644 (file)
@@ -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