From e4192756a18fc7f4a8c33cff738ff516428def66 Mon Sep 17 00:00:00 2001 From: luofeng Date: Wed, 13 Sep 2023 09:45:09 +0800 Subject: [PATCH] support clang build --- 0076-support-build-with-clang.patch | 59 +++++++++++++++++++++++++++++ criu.spec | 6 ++- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 0076-support-build-with-clang.patch diff --git a/0076-support-build-with-clang.patch b/0076-support-build-with-clang.patch new file mode 100644 index 0000000..3f4ca8b --- /dev/null +++ b/0076-support-build-with-clang.patch @@ -0,0 +1,59 @@ +From db2a18df9d47b7511120bc48a614c5abb0d67c16 Mon Sep 17 00:00:00 2001 +From: luofeng +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 + diff --git a/criu.spec b/criu.spec index 00dc69a..1c41b33 100644 --- a/criu.spec +++ b/criu.spec @@ -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 - 3.16.1-7 +- Support build with clang + * Thu Jul 27 2023 zhoujie - 3.16.1-6 - compel fix parasite with GCC 12 -- Gitee