diff options
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.patch | 58 |
1 files changed, 43 insertions, 15 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 d4d5973e..a709d125 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 | |||
@@ -14,29 +14,57 @@ Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | |||
14 | 14 | ||
15 | Index: git/src/import/Makefile | 15 | Index: git/src/import/Makefile |
16 | =================================================================== | 16 | =================================================================== |
17 | --- git.orig/src/import/Makefile | 17 | --- git.orig/src/import/Makefile 2020-10-12 07:36:18.775820388 -0700 |
18 | +++ git/src/import/Makefile | 18 | +++ git/src/import/Makefile 2020-10-12 08:00:05.134151221 -0700 |
19 | @@ -166,19 +166,19 @@ | 19 | @@ -163,19 +163,19 @@ |
20 | |||
21 | build: ## build the go packages | ||
22 | @echo "$(WHALE) $@" | ||
23 | - @go build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} ${EXTRA_FLAGS} ${GO_LDFLAGS} ${PACKAGES} | ||
24 | + @$(GO) build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} ${EXTRA_FLAGS} ${GO_LDFLAGS} ${PACKAGES} | ||
25 | |||
26 | test: ## run tests, except integration tests and tests that require root | ||
27 | @echo "$(WHALE) $@" | ||
28 | - @go test ${TESTFLAGS} $(filter-out ${INTEGRATION_PACKAGE},${PACKAGES}) | ||
29 | + @$(GO) test ${TESTFLAGS} $(filter-out ${INTEGRATION_PACKAGE},${PACKAGES}) | ||
30 | |||
31 | root-test: ## run tests, except integration tests | ||
32 | @echo "$(WHALE) $@" | ||
33 | - @go test ${TESTFLAGS} $(filter-out ${INTEGRATION_PACKAGE},${TEST_REQUIRES_ROOT_PACKAGES}) -test.root | ||
34 | + @$(GO) test ${TESTFLAGS} $(filter-out ${INTEGRATION_PACKAGE},${TEST_REQUIRES_ROOT_PACKAGES}) -test.root | ||
35 | |||
36 | integration: ## run integration tests | ||
37 | @echo "$(WHALE) $@" | ||
38 | - @go test ${TESTFLAGS} -test.root -parallel ${TESTFLAGS_PARALLEL} | ||
39 | + @$(GO) test ${TESTFLAGS} -test.root -parallel ${TESTFLAGS_PARALLEL} | ||
40 | |||
41 | benchmark: ## run benchmarks tests | ||
42 | @echo "$(WHALE) $@" | ||
43 | @@ -185,7 +185,7 @@ | ||
44 | |||
45 | define BUILD_BINARY = | ||
46 | @echo "$(WHALE) $@" | ||
47 | -@go build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@ ${GO_LDFLAGS} ${GO_TAGS} ./$< | ||
48 | +@$(GO) build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@ ${GO_LDFLAGS} ${GO_TAGS} ./$< | ||
49 | endef | ||
50 | |||
20 | # Build a binary from a cmd. | 51 | # Build a binary from a cmd. |
21 | bin/%: cmd/% FORCE | 52 | @@ -194,15 +194,15 @@ |
22 | @echo "$(WHALE) $@${BINARY_SUFFIX}" | ||
23 | - @go build ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@${BINARY_SUFFIX} ${GO_LDFLAGS} ${GO_TAGS} ./$< | ||
24 | + @$(GO) build ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@${BINARY_SUFFIX} ${GO_LDFLAGS} ${GO_TAGS} ./$< | ||
25 | 53 | ||
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 | 54 | 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 |
27 | @echo "$(WHALE) bin/containerd-shim" | 55 | @echo "$(WHALE) bin/containerd-shim" |
28 | - @CGO_ENABLED=0 go build ${GO_BUILD_FLAGS} -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim | 56 | - @CGO_ENABLED=${SHIM_CGO_ENABLED} go build ${GO_BUILD_FLAGS} -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim |
29 | + @$(GO) build ${GO_BUILD_FLAGS} -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim | 57 | + @CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build ${GO_BUILD_FLAGS} -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim |
30 | 58 | ||
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 | 59 | 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" | 60 | @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 | 61 | - @CGO_ENABLED=${SHIM_CGO_ENABLED} 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 | 62 | + @CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v1 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v1 |
35 | 63 | ||
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 | 64 | bin/containerd-shim-runc-v2: cmd/containerd-shim-runc-v2 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}" | 65 | @echo "$(WHALE) bin/containerd-shim-runc-v2" |
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 | 66 | - @CGO_ENABLED=${SHIM_CGO_ENABLED} go build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v2 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v2 |
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 | 67 | + @CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v2 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v2 |
40 | 68 | ||
41 | binaries: $(BINARIES) ## build binaries | 69 | binaries: $(BINARIES) ## build binaries |
42 | @echo "$(WHALE) $@" | 70 | @echo "$(WHALE) $@" |