summaryrefslogtreecommitdiffstats
path: root/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch')
-rw-r--r--recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch41
1 files changed, 30 insertions, 11 deletions
diff --git a/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch b/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch
index 75a984be..c2433f14 100644
--- a/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch
+++ b/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch
@@ -1,26 +1,45 @@
1From e31acef290181434efaf47e70db7ad0d92dbe300 Mon Sep 17 00:00:00 2001 1From 408e8b526d490af817a64b7220e8e2c3789de58f Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@windriver.com> 2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Thu, 19 Apr 2018 17:09:51 -0400 3Date: Sun, 10 Feb 2019 23:46:06 +0000
4Subject: [PATCH] build: use oe provided GO and flags 4Subject: [PATCH] build: use oe provided GO and flags
5 5
6Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> 6We want to use the go compiler as defined in the oe-enviroment, not the
7generic call to 'go'. Without changing this, we'll get things like cgo
8errors and invalid flag combos.
9
10Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
7--- 11---
8 Makefile | 2 +- 12 Makefile | 8 ++++----
9 1 file changed, 1 insertion(+), 1 deletion(-) 13 1 file changed, 4 insertions(+), 4 deletions(-)
10 14
11diff --git a/src/import/Makefile b/src/import/Makefile 15diff --git a/src/import/Makefile b/src/import/Makefile
12index 9d8cf8a18fbc..492d033fe2a7 100644 16index 8e680133..fd7d2813 100644
13--- a/src/import/Makefile 17--- a/src/import/Makefile
14+++ b/src/import/Makefile 18+++ b/src/import/Makefile
15@@ -134,7 +134,7 @@ bin/%: cmd/% FORCE 19@@ -179,19 +179,19 @@ FORCE:
20 # Build a binary from a cmd.
21 bin/%: cmd/% FORCE
22 @echo "$(WHALE) $@${BINARY_SUFFIX}"
23- @go build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@${BINARY_SUFFIX} ${GO_LDFLAGS} ${GO_TAGS} ./$<
24+ @$(GO) build ${GO_BUILD_FLAGS} ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@${BINARY_SUFFIX} ${GO_LDFLAGS} ${GO_TAGS} ./$<
16 25
17 bin/containerd-shim: cmd/containerd-shim FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220 26 bin/containerd-shim: cmd/containerd-shim FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220
18 @echo "$(WHALE) bin/containerd-shim" 27 @echo "$(WHALE) bin/containerd-shim"
19- @CGO_ENABLED=0 go build -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim 28- @CGO_ENABLED=0 go build ${GO_BUILD_FLAGS} -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim
20+ @$(GO) build -o bin/containerd-shim ${SHIM_GO_LDFLAGS} $(GOBUILDFLAGS) ${GO_TAGS} ./cmd/containerd-shim 29+ @$(GO) build ${GO_BUILD_FLAGS} -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim
30
31 bin/containerd-shim-runc-v1: cmd/containerd-shim-runc-v1 FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220
32 @echo "$(WHALE) bin/containerd-shim-runc-v1"
33- @CGO_ENABLED=0 go build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v1 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v1
34+ @$(GO) build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v1 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v1
35
36 bin/containerd-shim-runhcs-v1: cmd/containerd-shim-runhcs-v1 FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220
37 @echo "$(WHALE) bin/containerd-shim-runhcs-v1${BINARY_SUFFIX}"
38- @CGO_ENABLED=0 go build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runhcs-v1${BINARY_SUFFIX} ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runhcs-v1
39+ @$(GO) build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runhcs-v1${BINARY_SUFFIX} ${SHIM_GO_LDFLAGS} $(GOBUILDFLAGS) ${GO_TAGS} ./cmd/containerd-shim-runhcs-v1
21 40
22 binaries: $(BINARIES) ## build binaries 41 binaries: $(BINARIES) ## build binaries
23 @echo "$(WHALE) $@" 42 @echo "$(WHALE) $@"
24-- 43--
252.4.0.53.g8440f74 442.19.1
26 45