summaryrefslogtreecommitdiffstats
path: root/recipes-networking/netns/files/0001-Use-correct-go-cross-compiler.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-networking/netns/files/0001-Use-correct-go-cross-compiler.patch')
-rw-r--r--recipes-networking/netns/files/0001-Use-correct-go-cross-compiler.patch77
1 files changed, 77 insertions, 0 deletions
diff --git a/recipes-networking/netns/files/0001-Use-correct-go-cross-compiler.patch b/recipes-networking/netns/files/0001-Use-correct-go-cross-compiler.patch
new file mode 100644
index 00000000..ed66e11b
--- /dev/null
+++ b/recipes-networking/netns/files/0001-Use-correct-go-cross-compiler.patch
@@ -0,0 +1,77 @@
1From d5c319bb61155d94bef2571a095d82983d786b94 Mon Sep 17 00:00:00 2001
2From: Paul Barker <pbarker@toganlabs.com>
3Date: Fri, 13 Oct 2017 17:58:11 +0000
4Subject: [PATCH] Use correct go cross-compiler
5
6Signed-off-by: Paul Barker <pbarker@toganlabs.com>
7Upstream-status: Pending
8---
9 Makefile | 16 ++++++++--------
10 1 file changed, 8 insertions(+), 8 deletions(-)
11
12diff --git a/Makefile b/Makefile
13index cb9a46d..633f884 100644
14--- a/src/import/Makefile
15+++ b/src/import/Makefile
16@@ -33,12 +33,12 @@ build: $(NAME) ## Builds a dynamic executable or package
17
18 $(NAME): *.go VERSION
19 @echo "+ $@"
20- go build -tags "$(BUILDTAGS)" ${GO_LDFLAGS} -o $(NAME) .
21+ $(GO) build -tags "$(BUILDTAGS)" ${GO_LDFLAGS} -o $(NAME) .
22
23 .PHONY: static
24 static: ## Builds a static executable
25 @echo "+ $@"
26- CGO_ENABLED=0 go build \
27+ CGO_ENABLED=0 $(GO) build \
28 -tags "$(BUILDTAGS) static_build" \
29 ${GO_LDFLAGS_STATIC} -o $(NAME) .
30
31@@ -55,21 +55,21 @@ lint: ## Verifies `golint` passes
32 .PHONY: test
33 test: ## Runs the go tests
34 @echo "+ $@"
35- @go test -v -tags "$(BUILDTAGS) cgo" $(shell go list ./... | grep -v vendor)
36+ @$(GO) test -v -tags "$(BUILDTAGS) cgo" $(shell $(GO) list ./... | grep -v vendor)
37
38 .PHONY: vet
39 vet: ## Verifies `go vet` passes
40 @echo "+ $@"
41- @go vet $(shell go list ./... | grep -v vendor) | grep -v '.pb.go:' | tee /dev/stderr
42+ @$(GO) vet $(shell $(GO) list ./... | grep -v vendor) | grep -v '.pb.go:' | tee /dev/stderr
43
44 .PHONY: install
45 install: ## Installs the executable or package
46 @echo "+ $@"
47- @go install .
48+ @$(GO) install .
49
50 define buildpretty
51 mkdir -p $(BUILDDIR)/$(1)/$(2);
52-GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 go build \
53+GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 $(GO) build \
54 -o $(BUILDDIR)/$(1)/$(2)/$(NAME) \
55 -a -tags "$(BUILDTAGS) static_build netgo" \
56 -installsuffix netgo ${GO_LDFLAGS_STATIC} .;
57@@ -83,7 +83,7 @@ cross: *.go VERSION ## Builds the cross-compiled binaries, creating a clean dire
58 $(foreach GOOSARCH,$(GOOSARCHES), $(call buildpretty,$(subst /,,$(dir $(GOOSARCH))),$(notdir $(GOOSARCH))))
59
60 define buildrelease
61-GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 go build \
62+GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 $(GO) build \
63 -o $(BUILDDIR)/$(NAME)-$(1)-$(2) \
64 -a -tags "$(BUILDTAGS) static_build netgo" \
65 -installsuffix netgo ${GO_LDFLAGS_STATIC} .;
66@@ -99,7 +99,7 @@ release: *.go VERSION ## Builds the cross-compiled binaries, naming them in such
67 .PHONY: bump-version
68 BUMP := patch
69 bump-version: ## Bump the version in the version file. Set KIND to [ patch | major | minor ]
70- @go get -u github.com/jessfraz/junk/sembump # update sembump tool
71+ @$(GO) get -u github.com/jessfraz/junk/sembump # update sembump tool
72 $(eval NEW_VERSION = $(shell sembump --kind $(BUMP) $(VERSION)))
73 @echo "Bumping VERSION from $(VERSION) to $(NEW_VERSION)"
74 echo $(NEW_VERSION) > VERSION
75--
762.7.4
77