Fix build on riscv64
This commit is contained in:
parent
b25bf156b4
commit
48a0a434a6
38
1000-fix-build-on-riscv64.patch
Normal file
38
1000-fix-build-on-riscv64.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
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)
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
Name: secpaver
|
Name: secpaver
|
||||||
Summary: Security policy development tool
|
Summary: Security policy development tool
|
||||||
Version: 1.0.2
|
Version: 1.0.2
|
||||||
Release: 5
|
Release: 6
|
||||||
License: MulanPSL-2.0
|
License: MulanPSL-2.0
|
||||||
URL: https://gitee.com/openeuler/secpaver
|
URL: https://gitee.com/openeuler/secpaver
|
||||||
Source: https://gitee.com/openeuler/secpaver/repository/archive/%{name}-%{version}.tar.gz
|
Source: https://gitee.com/openeuler/secpaver/repository/archive/%{name}-%{version}.tar.gz
|
||||||
@ -11,6 +11,9 @@ Source1: sys.tar.gz
|
|||||||
|
|
||||||
Patch0001: dont-do-daemon-reload-in-make-install.patch
|
Patch0001: dont-do-daemon-reload-in-make-install.patch
|
||||||
Patch0002: set-default-log-path.patch
|
Patch0002: set-default-log-path.patch
|
||||||
|
%ifarch riscv64
|
||||||
|
Patch1000: 1000-fix-build-on-riscv64.patch
|
||||||
|
%endif
|
||||||
|
|
||||||
BuildRequires: golang make systemd
|
BuildRequires: golang make systemd
|
||||||
Requires: %{name}-plugin = %{version}-%{release}
|
Requires: %{name}-plugin = %{version}-%{release}
|
||||||
@ -79,6 +82,9 @@ tar -xf %{SOURCE1} -C vendor/golang.org/x/
|
|||||||
%systemd_postun_with_restart pavd.service
|
%systemd_postun_with_restart pavd.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Sep 15 2023 misaka00251 <liuxin@iscas.ac.cn> - 1.0.2-6
|
||||||
|
- Fix build on riscv64
|
||||||
|
|
||||||
* Tue Jul 11 2023 huajingyun <huajingyun@loongson.cn> - 1.0.2-5
|
* Tue Jul 11 2023 huajingyun <huajingyun@loongson.cn> - 1.0.2-5
|
||||||
- Add loong64 support
|
- Add loong64 support
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user