10 Star 0 Fork 12

src-openEuler / cadvisor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
add-parameters-to-solve-the-strip.patch 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
jiangxinyu 提交于 2023-03-07 17:01 . Add strip and pie
From 0bd8cba374f1c735f48945fb14f165f087d49bd1 Mon Sep 17 00:00:00 2001
From: jxy_git <jiangxinyu@kylinos.cn>
Date: Tue, 7 Mar 2023 16:54:00 +0800
Subject: [PATCH] add parameters to solve the strip
---
build/build.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/build/build.sh b/build/build.sh
index b8cae39..79cec50 100755
--- a/build/build.sh
+++ b/build/build.sh
@@ -37,12 +37,12 @@ if [ "${go_version:0:3}" = "1.4" ]; then
fi
ldflags="
- -X ${repo_path}/version.Version${ldseparator}${version}
- -X ${repo_path}/version.Revision${ldseparator}${revision}
- -X ${repo_path}/version.Branch${ldseparator}${branch}
- -X ${repo_path}/version.BuildUser${ldseparator}${BUILD_USER}
- -X ${repo_path}/version.BuildDate${ldseparator}${BUILD_DATE}
- -X ${repo_path}/version.GoVersion${ldseparator}${go_version}"
+ -w -s -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now -pie' -X ${repo_path}/version.Version${ldseparator}${version}
+ -w -s -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now -pie' -X ${repo_path}/version.Revision${ldseparator}${revision}
+ -w -s -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now -pie' -X ${repo_path}/version.Branch${ldseparator}${branch}
+ -w -s -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now -pie' -X ${repo_path}/version.BuildUser${ldseparator}${BUILD_USER}
+ -w -s -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now -pie' -X ${repo_path}/version.BuildDate${ldseparator}${BUILD_DATE}
+ -w -s -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now -pie' -X ${repo_path}/version.GoVersion${ldseparator}${go_version}"
echo ">> building cadvisor"
--
2.39.1
1
https://gitee.com/src-openeuler/cadvisor.git
git@gitee.com:src-openeuler/cadvisor.git
src-openeuler
cadvisor
cadvisor
master

搜索帮助