1 Star 0 Fork 43

zhaozikui/kubernetes

forked from src-openEuler/kubernetes 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-fix-compile-options.patch 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
liuxu 提交于 2024-04-26 16:27 . adapt old patch
From ed51f4be525cbaf5d2fa508260e1ecc80c95dd25 Mon Sep 17 00:00:00 2001
From: liuxu <liuxu156@huawei.com>
Date: Fri, 26 Apr 2024 10:30:18 +0800
Subject: [PATCH] fix compile options
Signed-off-by: liuxu <liuxu156@huawei.com>
---
hack/lib/golang.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh
index f3466ff7..0cc59787 100755
--- a/hack/lib/golang.sh
+++ b/hack/lib/golang.sh
@@ -781,6 +781,7 @@ kube::golang::build_binaries_for_platform() {
-installsuffix=static
${goflags:+"${goflags[@]}"}
-gcflags="${gogcflags}"
+ -buildmode=pie
-asmflags="${goasmflags}"
-ldflags="${goldflags}"
-tags="${gotags:-}"
@@ -792,6 +793,7 @@ kube::golang::build_binaries_for_platform() {
build_args=(
${goflags:+"${goflags[@]}"}
-gcflags="${gogcflags}"
+ -buildmode=pie
-asmflags="${goasmflags}"
-ldflags="${goldflags}"
-tags="${gotags:-}"
@@ -881,7 +883,7 @@ kube::golang::build_binaries() {
goasmflags=""
fi
- goldflags="all=$(kube::version::ldflags) ${GOLDFLAGS:-}"
+ goldflags="all=$(kube::version::ldflags) ${GOLDFLAGS:-} -linkmode=external"
if [[ "${DBG:-}" != 1 ]]; then
# Not debugging - disable symbols and DWARF.
goldflags="${goldflags} -s -w"
--
2.34.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhaozikui/kubernetes.git
git@gitee.com:zhaozikui/kubernetes.git
zhaozikui
kubernetes
kubernetes
master

搜索帮助