加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
1000-fix-build-on-riscv64.patch 1.22 KB
一键复制 编辑 原始数据 按行查看 历史
misaka00251 提交于 2023-09-15 20:46 . Fix build on riscv64
From 4f467c68ee190d2f8094b0342f6c76be15071046 Mon Sep 17 00:00:00 2001
From: misaka00251 <liuxin@iscas.ac.cn>
Date: Fri, 15 Sep 2023 20:46:15 +0800
Subject: [PATCH] Fix build on riscv64
---
Makefile | 2 +-
cmd/plugin/selinux/selinux.go | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 858346a..6e88e24 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@ all: pav pavd
selinux:
CGO_CFLAGS_ALLOW="-ftrapv -D_FORTIFY_SOURCE=2 -O2" CGO_CFLAGS="-fstack-protector-strong -ftrapv -D_FORTIFY_SOURCE=2 -O2" \
CGO_LDFALGS_ALLOW="-Wl,-z,-s,relro,now,noexecstack" CGO_LDFALGS="-Wl,-z,-s,relro,now,noexecstack" \
- go build -buildmode=plugin $(BUILDFLAGS) -ldflags '$(LDFLAGS)' -o $(BUILD_DIR)/selinux.so cmd/plugin/selinux/*.go
+ go build $(BUILDFLAGS) -ldflags '$(LDFLAGS)' -o $(BUILD_DIR)/selinux.so cmd/plugin/selinux/*.go
strip $(BUILD_DIR)/selinux.so
pav:
diff --git a/cmd/plugin/selinux/selinux.go b/cmd/plugin/selinux/selinux.go
index 819963b..94ca4ec 100644
--- a/cmd/plugin/selinux/selinux.go
+++ b/cmd/plugin/selinux/selinux.go
@@ -32,3 +32,6 @@ func GetEngine() engine.Engine {
return e
}
+
+func main() {
+}
\ No newline at end of file
--
2.39.2 (Apple Git-143)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化