!146 添加loongarch64支持

From: @zhong-wei-shen 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
This commit is contained in:
openeuler-ci-bot 2024-11-01 09:14:33 +00:00 committed by Gitee
commit 2215b830c5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,37 @@
From c5bdb0c5b87ca1b94b59f88b548b9f2c263ef2df Mon Sep 17 00:00:00 2001
From: shenzhongwei <shenzhongwei@kylinos.cn>
Date: Tue, 14 May 2024 15:50:15 +0800
Subject: [PATCH] add loongarch64 support
---
kpatch-build/Makefile | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/kpatch-build/Makefile b/kpatch-build/Makefile
index f24165b..f042a6a 100644
--- a/kpatch-build/Makefile
+++ b/kpatch-build/Makefile
@@ -13,6 +13,11 @@ SOURCES = create-diff-object.c kpatch-elf.c \
SOURCES += insn/insn.c insn/inat.c
INSN = insn/insn.o insn/inat.o
insn/%.o: CFLAGS := $(filter-out -Wconversion, $(CFLAGS))
+ifeq ($(ARCH),loongarch64)
+SOURCES += insn/insn.c insn/inat.c
+INSN = insn/insn.o insn/inat.o
+insn/%.o: CFLAGS := $(filter-out -Wconversion, $(CFLAGS))
+endif
ifeq ($(ARCH),ppc64le)
SOURCES += gcc-plugins/ppc64le-plugin.c
PLUGIN = gcc-plugins/ppc64le-plugin.so
@@ -22,7 +27,7 @@ PLUGIN_CFLAGS := $(filter-out -Wconversion, $(CFLAGS))
PLUGIN_CFLAGS += -shared -I$(GCC_PLUGINS_DIR)/include \
-Igcc-plugins -fPIC -fno-rtti -O2 -Wall
endif
-ifeq ($(filter $(ARCH),s390x x86_64 ppc64le aarch64 riscv64),)
+ifeq ($(filter $(ARCH),s390x x86_64 ppc64le aarch64 riscv64 loongarch64),)
$(error Unsupported architecture ${ARCH}, check https://github.com/dynup/kpatch/#supported-architectures)
endif
--
2.43.0

View File

@ -1,7 +1,7 @@
Name: kpatch
Epoch: 1
Version: 0.9.9
Release: 8
Release: 9
Summary: A Linux dynamic kernel patching infrastructure
License: GPLv2
@ -52,6 +52,7 @@ Patch0036:0036-create-diff-object-ignore-entsize-change-of-.return_.patch
Patch0037:0037-add-initial-riscv64-support.patch
Patch0038:0038-Fix-undefined-behavior-problem-when-using-list_forea.patch
Patch0039:0039-build-support-for-building-with-clang.patch
Patch0040:0001-add-loongarch64-support.patch
Patch9001:huawei-fix-function-ptr-relocation.patch
Patch9002:huawei-lookup.c-ignore-BTF-ID-when-matching-locals.patch
@ -122,6 +123,12 @@ popd
%{_mandir}/man1/*.1.gz
%changelog
* Fri May 24 2024 shenzhongwei <shenzhongwei@kylinos.cn> - 1:0.9.9-9
- Type:update
- CVE:NA
- SUG:NA
- DESC:add support loongarch64
* Wed Jun 12 2024 peng.zou <peng.zou@shingroup.cn> - 1:0.9.9-8
- Type:enhancement
- ID:NA