diff options
Diffstat (limited to 'recipes-containers/containerd/containerd-opencontainers/0001-Add-build-option-GODEBUG-1.patch')
-rw-r--r-- | recipes-containers/containerd/containerd-opencontainers/0001-Add-build-option-GODEBUG-1.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/recipes-containers/containerd/containerd-opencontainers/0001-Add-build-option-GODEBUG-1.patch b/recipes-containers/containerd/containerd-opencontainers/0001-Add-build-option-GODEBUG-1.patch new file mode 100644 index 00000000..05c4f153 --- /dev/null +++ b/recipes-containers/containerd/containerd-opencontainers/0001-Add-build-option-GODEBUG-1.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 84874e47aa2025b8e73df0286c44f3b8a1d9fdb2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Mon, 2 Sep 2019 16:20:07 +0800 | ||
4 | Subject: [PATCH] Add build option "GODEBUG=1" | ||
5 | |||
6 | Make will generate GDB friendly binary with this build option. | ||
7 | |||
8 | Signed-off-by: Hui Zhu <teawater@hyper.sh> | ||
9 | |||
10 | Upstream-Status: Backport [c5a0c7f491b435e4eb45972903b00e2d8ed46495] | ||
11 | |||
12 | Partly backport and refresh to v1.2.7 | ||
13 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
14 | --- | ||
15 | src/import/Makefile | 8 ++++++-- | ||
16 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/src/import/Makefile b/src/import/Makefile | ||
19 | index 4355395..4fb5d3b 100644 | ||
20 | --- a/src/import/Makefile | ||
21 | +++ b/src/import/Makefile | ||
22 | @@ -75,11 +75,15 @@ TEST_REQUIRES_ROOT_PACKAGES=$(filter \ | ||
23 | COMMANDS=ctr containerd containerd-stress | ||
24 | MANPAGES=ctr.1 containerd.1 containerd-config.1 containerd-config.toml.5 | ||
25 | |||
26 | +ifndef GODEBUG | ||
27 | + EXTRA_LDFLAGS += -s -w | ||
28 | +endif | ||
29 | + | ||
30 | # Build tags seccomp and apparmor are needed by CRI plugin. | ||
31 | BUILDTAGS ?= seccomp apparmor | ||
32 | GO_TAGS=$(if $(BUILDTAGS),-tags "$(BUILDTAGS)",) | ||
33 | -GO_LDFLAGS=-ldflags '-s -w -X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) $(EXTRA_LDFLAGS)' | ||
34 | -SHIM_GO_LDFLAGS=-ldflags '-s -w -X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) -extldflags "-static"' | ||
35 | +GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) $(EXTRA_LDFLAGS)' | ||
36 | +SHIM_GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) -extldflags "-static" $(EXTRA_LDFLAGS)' | ||
37 | |||
38 | #Replaces ":" (*nix), ";" (windows) with newline for easy parsing | ||
39 | GOPATHS=$(shell echo ${GOPATH} | tr ":" "\n" | tr ";" "\n") | ||
40 | -- | ||
41 | 2.7.4 | ||
42 | |||