1 Star 0 Fork 27

武积超/syscontainer-tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0003-enable-external-linkmode-for-cgo-build.patch 963 Bytes
一键复制 编辑 原始数据 按行查看 历史
From df6545261395654bdba369e23b7b4fd6705cad93 Mon Sep 17 00:00:00 2001
From: zhangsong234 <[email protected]>
Date: Thu, 2 Sep 2021 20:49:07 +0800
Subject: [PATCH] enable external linkmode for cgo build
Signed-off-by: zhangsong234 <[email protected]>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 792a861..5881aec 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ VERSION := $(shell cat ./VERSION)
BEP_DIR=/tmp/syscontainer-tools-build-bep
BEP_FLAGS=-tmpdir=/tmp/syscontainer-tools-build-bep
-GO_LDFLAGS="-buildid=IdByiSula $(BEP_FLAGS) -extldflags=-static -extldflags=-Wl,-z,relro,-z,now -X main.gitCommit=${COMMIT} -X main.version=${VERSION}"
+GO_LDFLAGS="-buildid=IdByiSula $(BEP_FLAGS) -linkmode=external -extldflags=-static -extldflags=-Wl,-z,relro,-z,now -X main.gitCommit=${COMMIT} -X main.version=${VERSION}"
ENV = GOPATH=${GOPATH} \
CGO_ENABLED=1 \
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wu-jichao123/syscontainer-tools.git
[email protected]:wu-jichao123/syscontainer-tools.git
wu-jichao123
syscontainer-tools
syscontainer-tools
master

搜索帮助