!57 Fix riscv64 support
From: @misaka00251 Reviewed-by: @duguhaotian, @zh_xiaoyu Signed-off-by: @duguhaotian
This commit is contained in:
commit
229bbd3776
45
0026-fix-riscv64-support.patch
Normal file
45
0026-fix-riscv64-support.patch
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
From dee36494daeb90328b2f1cab8dbd542ef886952e Mon Sep 17 00:00:00 2001
|
||||||
|
From: misaka00251 <liuxin@iscas.ac.cn>
|
||||||
|
Date: Sun, 9 Apr 2023 15:56:16 +0800
|
||||||
|
Subject: [PATCH] Fix riscv64 support
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile | 9 ++++++++-
|
||||||
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 2592752..a576db0 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -6,12 +6,19 @@ ifndef ARCH
|
||||||
|
ARCH = amd64
|
||||||
|
ifeq ($(shell uname -p), aarch64)
|
||||||
|
ARCH = arm64
|
||||||
|
+else ifeq ($(shell uname -p), riscv64)
|
||||||
|
+ARCH = riscv64
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
TMP_PATH := /tmp/xxeggo
|
||||||
|
|
||||||
|
EXTRALDFLAGS :=
|
||||||
|
+ifeq ($(shell uname -p), riscv64)
|
||||||
|
+EXTLDFLAGS := -Wl,-z,now
|
||||||
|
+else
|
||||||
|
+EXTLDFLAGS := -static-pie -Wl,-z,now
|
||||||
|
+endif
|
||||||
|
LDFLAGS := -X isula.org/eggo/cmd.Version=$(VERSION) \
|
||||||
|
-X isula.org/eggo/cmd.Commit=$(GIT_COMMIT) \
|
||||||
|
-X isula.org/eggo/cmd.BuildTime=$(SOURCE_DATE_EPOCH) \
|
||||||
|
@@ -21,7 +28,7 @@ STATIC_LDFLAGS := -extldflags=-static -linkmode=external
|
||||||
|
SAFEBUILDFLAGS := -buildmode=pie \
|
||||||
|
-extldflags=-ftrapv -extldflags=-zrelro -extldflags=-znow \
|
||||||
|
-linkmode=external \
|
||||||
|
- -extldflags "-static-pie -Wl,-z,now" \
|
||||||
|
+ -extldflags "$(EXTRALDFLAGS)" \
|
||||||
|
-tmpdir=$(TMP_PATH) \
|
||||||
|
$(LDFLAGS)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.37.1 (Apple Git-137.1)
|
||||||
|
|
||||||
13
eggo.spec
13
eggo.spec
@ -1,6 +1,6 @@
|
|||||||
Name: eggo
|
Name: eggo
|
||||||
Version: 0.9.4
|
Version: 0.9.4
|
||||||
Release: 9
|
Release: 10
|
||||||
Summary: Eggo is a tool built to provide standard multi-ways for creating Kubernetes clusters.
|
Summary: Eggo is a tool built to provide standard multi-ways for creating Kubernetes clusters.
|
||||||
License: Mulan PSL V2
|
License: Mulan PSL V2
|
||||||
URL: https://gitee.com/openeuler/eggo
|
URL: https://gitee.com/openeuler/eggo
|
||||||
@ -31,6 +31,7 @@ Patch0022: 0022-add-golangci-check.patch
|
|||||||
Patch0023: 0023-add-golang-static-code-check.patch
|
Patch0023: 0023-add-golang-static-code-check.patch
|
||||||
Patch0024: 0024-modify-dependency-install-command.patch
|
Patch0024: 0024-modify-dependency-install-command.patch
|
||||||
Patch0025: 0025-fix-panic-in-os-user.Current.patch
|
Patch0025: 0025-fix-panic-in-os-user.Current.patch
|
||||||
|
Patch0026: 0026-fix-riscv64-support.patch
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: git
|
BuildRequires: git
|
||||||
@ -51,7 +52,11 @@ cp -rf vendor src
|
|||||||
mkdir -p src/isula.org/eggo
|
mkdir -p src/isula.org/eggo
|
||||||
cp -rf cmd pkg src/isula.org/eggo/
|
cp -rf cmd pkg src/isula.org/eggo/
|
||||||
export GOPATH=$(pwd):$GOPATH
|
export GOPATH=$(pwd):$GOPATH
|
||||||
|
%ifarch riscv64
|
||||||
|
ARCH=riscv64 %{make_build} safe
|
||||||
|
%else
|
||||||
%{make_build} safe
|
%{make_build} safe
|
||||||
|
%endif
|
||||||
strip bin/eggo
|
strip bin/eggo
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -72,6 +77,12 @@ rm -rf src
|
|||||||
%attr(551,root,root) %{_bindir}/eggo
|
%attr(551,root,root) %{_bindir}/eggo
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Apr 09 2023 misaka00251 <liuxin@iscas.ac.cn> - 0.9.4-10
|
||||||
|
- Type:feature
|
||||||
|
- CVE:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:Fix riscv64 support
|
||||||
|
|
||||||
* Tue Feb 07 2023 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 0.9.4-9
|
* Tue Feb 07 2023 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 0.9.4-9
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- CVE:NA
|
- CVE:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user