From 62a39b48a8c48c6eae1ad889c0f7a935221fe010 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Fri, 7 Aug 2020 23:46:58 -0400 Subject: go-build: fix build with new go-binary bootstrapped toolchain We need to be more explicity in our exports and use of 'go' to build properly with the new binary bootstrapped go toolchain. Signed-off-by: Bruce Ashfield --- .../go/go-build/0001-build-use-instead-of-go.patch | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 recipes-devtools/go/go-build/0001-build-use-instead-of-go.patch (limited to 'recipes-devtools/go/go-build/0001-build-use-instead-of-go.patch') diff --git a/recipes-devtools/go/go-build/0001-build-use-instead-of-go.patch b/recipes-devtools/go/go-build/0001-build-use-instead-of-go.patch new file mode 100644 index 00000000..36d45b57 --- /dev/null +++ b/recipes-devtools/go/go-build/0001-build-use-instead-of-go.patch @@ -0,0 +1,33 @@ +From 4db28c98481056c41097f808335c37e8517fe485 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Fri, 7 Aug 2020 23:39:18 -0400 +Subject: [PATCH] build: use instead of 'go' + +While we can get away with 'go' if the host/target arch match, the +new go-binary toolchain blows up in a cross compile situation. + +Signed-off-by: Bruce Ashfield +--- + gobuild/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/import/gobuild/Makefile b/src/import/gobuild/Makefile +index 694d9ce..149d573 100644 +--- a/src/import/gobuild/Makefile ++++ b/src/import/gobuild/Makefile +@@ -19,10 +19,10 @@ dep: ${GODEPPATHS} + + ${GODEPPATHS}: + mkdir -p ${GOSRC} +- GOPATH=${GOPATH} go get $(subst ${GOSRC}/,,$@) ++ GOPATH=${GOPATH} ${GO} get $(subst ${GOSRC}/,,$@) + + ${BIN}: ${GODEPPATHS} $(filter %/$@.go, ${MAIN}) +- GOPATH=${GOPATH} ${ARCH} go build $(filter %/$@.go, ${MAIN}) ++ GOPATH=${GOPATH} ${ARCH} ${GO} build $(filter %/$@.go, ${MAIN}) + + clean: + rm -f ${BIN} +-- +2.19.1 + -- cgit v1.2.3-54-g00ecf