10 Star 1 Fork 11

src-openEuler/eggo
Closed

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
0026-fix-riscv64-support.patch 1.18 KB
Copy Edit Raw Blame History
misaka00251 authored 2023-04-09 15:57 +08:00 . Fix riscv64 support
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)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/eggo.git
git@gitee.com:src-openeuler/eggo.git
src-openeuler
eggo
eggo
master

Search