!60 【LLVM平行宇宙】Support build with clang

From: @luofeng14 
Reviewed-by: @hjx_gitff 
Signed-off-by: @hjx_gitff
This commit is contained in:
openeuler-ci-bot 2023-09-13 03:06:56 +00:00 committed by Gitee
commit 9d09b4ed9b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 64 additions and 1 deletions

View File

@ -0,0 +1,59 @@
From db2a18df9d47b7511120bc48a614c5abb0d67c16 Mon Sep 17 00:00:00 2001
From: luofeng <luofeng13@huawei.com>
Date: Wed, 6 Sep 2023 14:15:57 +0000
Subject: [PATCH] support build with clang
---
Makefile | 1 -
criu/arch/aarch64/include/asm/restorer.h | 10 +++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index c1eafdd..14c0008 100644
--- a/Makefile
+++ b/Makefile
@@ -82,7 +82,6 @@ endif
# secure compilation options
CFLAGS += -fstack-protector-all -fPIE
-LDFLAGS += -pie
#
# CFLAGS_PIE:
diff --git a/criu/arch/aarch64/include/asm/restorer.h b/criu/arch/aarch64/include/asm/restorer.h
index 64a9c24..f12f89d 100644
--- a/criu/arch/aarch64/include/asm/restorer.h
+++ b/criu/arch/aarch64/include/asm/restorer.h
@@ -13,7 +13,7 @@
#define RUN_CLONE_RESTORE_FN(ret, clone_flags, new_sp, parent_tid, \
thread_args, clone_restore_fn) \
asm volatile( \
- "clone_emul: \n" \
+ "clone_emul_%=: \n" \
"ldr x1, %2 \n" \
"and x1, x1, #~15 \n" \
"sub x1, x1, #16 \n" \
@@ -24,16 +24,16 @@
"mov x8, #"__stringify(__NR_clone)" \n" \
"svc #0 \n" \
\
- "cbz x0, thread_run \n" \
+ "cbz x0, thread_run_%= \n" \
\
"mov %0, x0 \n" \
- "b clone_end \n" \
+ "b clone_end_%= \n" \
\
- "thread_run: \n" \
+ "thread_run_%=: \n" \
"ldp x1, x0, [sp] \n" \
"br x1 \n" \
\
- "clone_end: \n" \
+ "clone_end_%=: \n" \
: "=r"(ret) \
: "r"(clone_flags), \
"m"(new_sp), \
--
2.39.1

View File

@ -1,6 +1,6 @@
Name: criu
Version: 3.16.1
Release: 6
Release: 7
Provides: crtools = %{version}-%{release}
Obsoletes: crtools <= 1.0-2
Summary: A tool of Checkpoint/Restore in User-space
@ -93,6 +93,7 @@ Patch: 0072-kabichk-add-KABI-check-code.patch
Patch: 0073-criu-fix-conflicting-headers.patch
Patch: 0074-mount-add-definition-for-FSOPEN_CLOEXEC.patch
Patch: 0075-compel-fix-parasite-with-GCC-12.patch
Patch: 0076-support-build-with-clang.patch
%description
Checkpoint/Restore in Userspace(CRIU),is a software tool for the linux operating system.
@ -175,6 +176,9 @@ chmod 0755 %{buildroot}/run/%{name}/
%doc %{_mandir}/man1/{compel.1*,crit.1*,criu-ns.1*}
%changelog
* Tue Aug 22 2023 feng luo<luofeng13@huawei.com> - 3.16.1-7
- Support build with clang
* Thu Jul 27 2023 zhoujie <zhoujie133@huawei.com> - 3.16.1-6
- compel fix parasite with GCC 12