kata-containers/proxy/patches/0003-kata-proxy-add-linkmode-to-resolve-build-error.patch
holyfei c709612f2a kata-containers: modify kata-containers version
Fix #I4KI81
reason: modify kata-containers version and update
it to 1.11.1

Signed-off-by: holyfei <yangfeiyu20092010@163.com>
2021-11-30 20:08:25 +08:00

38 lines
1.0 KiB
Diff

From 5c4d7bcbef7d213009f1c63acf53319e230e06e2 Mon Sep 17 00:00:00 2001
From: jikui <jikui2@huawei.com>
Date: Mon, 22 Mar 2021 17:11:48 +0800
Subject: [PATCH] kata-proxy: add linkmode to resolve build error
reason: add linkmode to resolve build error
Signed-off-by: jikui <jikui2@huawei.com>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 07e9ba8..b931dd3 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@
#
# Set to "yes“ if binary stripping is needed.
-STRIP := no
+STRIP := yes
DESTDIR :=
ifeq ($(PREFIX),)
@@ -36,7 +36,7 @@ $(TARGET): $(SOURCES) $(VERSION_FILE)
CGO_CFLAGS="-fstack-protector-strong -fPIE -D_FORTIFY_SOURCE=2 -O2" \
CGO_LDFLAGS_ALLOW="-Wl,-z,relro,-z,now" \
CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" \
- go build $(BUILDFLAGS) -o $@ -ldflags "-X main.version=$(VERSION_COMMIT) $(KATA_LDFLAGS)"
+ go build $(BUILDFLAGS) -o $@ -ldflags "-linkmode=external -X main.version=$(VERSION_COMMIT) $(KATA_LDFLAGS)"
test:
bash .ci/go-test.sh
--
2.25.1