1 Star 0 Fork 8

wuzx/authz

forked from src-openEuler/authz 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0003-enable-external-linkmode-for-cgo-build.patch 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
From cdf9cf499f84376f42b71c69b92abbc6e79b9803 Mon Sep 17 00:00:00 2001
From: zhangsong234 <[email protected]>
Date: Mon, 22 Mar 2021 09:51:48 +0800
Subject: [PATCH] enable external linkmode for cgo build
Signed-off-by: zhangsong234 <[email protected]>
---
Makefile | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index f305f96..c375f54 100644
--- a/Makefile
+++ b/Makefile
@@ -18,17 +18,12 @@ BEP_FLAGS=-tmpdir=/tmp/authz-build-bep
default: dep binary
-GO_LDFLAGS = "-buildid=IdByiSula $(BEP_FLAGS) -buildmode=pie -extldflags=-static -extldflags=-Wl,-z,relro,-z,now -X main.version=$(VERSION)"
-ifneq ($(GOPATH), )
-CUS_GOPATH=${GOPATH}:${PWD}
-ENV = GOPATH=${CUS_GOPATH} \
+GO_LDFLAGS = "-buildid=IdByiSula $(BEP_FLAGS) -buildmode=pie -linkmode=external -extldflags=-static -extldflags=-Wl,-z,relro,-z,now -X main.version=$(VERSION)"
+ENV = GOPATH=${GOPATH} \
CGO_ENABLED=1 \
CGO_CFLAGS="-fstack-protector-strong -fPIE" \
CGO_LDFLAGS_ALLOW='-Wl,-z,relro,-z,now' \
CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack"
-else
-ENV = CGO_ENABLED=1
-endif
dep:
mkdir -p $(BEP_DIR)
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wuzx065891/authz.git
[email protected]:wuzx065891/authz.git
wuzx065891
authz
authz
master

搜索帮助