Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
b80a985ca0
!50 [sync] PR-44: Remove empty soft link file
From: @openeuler-sync-bot 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
2025-01-15 06:19:54 +00:00
wang--ge
33a55351fe remove empty soft link file
(cherry picked from commit 8c05ba5dd97adc9b028a4b5329d8768b8f97fd5c)
2025-01-15 11:15:27 +08:00
openeuler-ci-bot
68fbd38547
!33 Add ppc64le support
From: @peng_zou 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2024-02-19 06:04:53 +00:00
peng.zou
39f8d78503 Add ppc64le support 2024-01-22 11:44:29 +08:00
openeuler-ci-bot
22e4e6fe29
!36 Upgrade to 3.22.0
From: @starlet-dx 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
2024-01-11 07:48:24 +00:00
starlet-dx
adecb310dd Upgrade to 3.22.0 2024-01-11 14:36:23 +08:00
openeuler-ci-bot
dc6bc7aee0
!29 【LLVM平行宇宙】add clang compile support on AArch64
From: @liyunfei33 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
2023-09-06 07:06:47 +00:00
liyunfei
a7e40821c3 Add clang compile support on AArch64 2023-08-30 10:21:12 +08:00
openeuler-ci-bot
530e4f25e2
!25 Sync LoongArch with glibc 2.36
From: @FreeFlyingSheep 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2023-02-27 12:50:09 +00:00
Feiyang Chen
c73f05592c Valgrind: Sync LoongArch with glibc 2.36
Signed-off-by: Feiyang Chen <chenfeiyang@loongson.cn>
2023-01-03 19:39:53 +08:00
openeuler-ci-bot
526ab61ef0
!21 Add LOONGARCH64/Linux support
From: @FreeFlyingSheep 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
2022-12-19 06:08:35 +00:00
10 changed files with 9203 additions and 30428 deletions

View File

@ -0,0 +1,117 @@
diff --git a/include/pub_tool_libcsetjmp.h b/include/pub_tool_libcsetjmp.h
index 681450cef..ccdf295df 100644
--- a/include/pub_tool_libcsetjmp.h
+++ b/include/pub_tool_libcsetjmp.h
@@ -126,6 +126,111 @@ UWord VG_MINIMAL_SETJMP(VG_MINIMAL_JMP_BUF(_env));
__attribute__((noreturn))
void VG_MINIMAL_LONGJMP(VG_MINIMAL_JMP_BUF(_env));
+#elif defined __aarch64__ && defined __clang__
+
+// __builtin_setjmp is not implemented by the standard C library
+// used on Android in current llvm-based toolchains as of NDK r19.
+//
+// Here is a custom implementation of Valgrind's "minimal" setjmp
+// interface. Per the comment at the top of this file, we only need
+// to save integer registers.
+//
+// Per the Procedure Call Standard for the ARM 64-bit Architecture
+// document,
+// http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055b/IHI0055B_aapcs64.pdf
+// Section 5.1.1. General-purpose registers:
+// >
+// > A subroutine invocation must preserve the contents of the
+// > registers r19-r29 and SP."
+//
+// We also need to save and restore r30, the link register, i.e.
+// the default destination that a 'ret' instruction branches to.
+//
+// Note that this document is phrased in terms of 'r' registers
+// (e.g. "r30") because it aims to be agnostic as to A64 vs A32
+// instruction sets, but here we are targeting the A64 instruction
+// set, so we are dealing with 'x' registers.
+
+
+#define VG_MINIMAL_JMP_BUF(_name) UWord _name [13]
+
+__attribute__((returns_twice))
+inline UWord VG_MINIMAL_SETJMP(VG_MINIMAL_JMP_BUF(_env))
+{
+ asm volatile(
+ // x9 is the first of the regular temporary registers
+ // per the above-mentioned Procedule Call Standard document.
+ // Use it as temporary to hold the value of SP, since str does
+ // not accept SP as operand.
+ " mov x9, sp \n"
+ // Store the general-purpose registers that we need to save
+ // per the above discussion.
+ // Note that x30 is the link register.
+ " stp x19, x20, [%[_env], 0] \n"
+ " stp x21, x22, [%[_env], 0x10] \n"
+ " stp x23, x24, [%[_env], 0x20] \n"
+ " stp x25, x26, [%[_env], 0x30] \n"
+ " stp x27, x28, [%[_env], 0x40] \n"
+ " stp x29, x30, [%[_env], 0x50] \n"
+ // Store the value of SP.
+ " str x9, [%[_env], 0x60] \n"
+ :
+ // No outputs
+ :
+ // Inputs
+ [_env]"r"(_env)
+ :
+ // Clobbers.
+ // We have used x9 as a temporary
+ "x9",
+ // We have written to memory locations
+ "memory");
+
+ // Direct invokation of setjmp always returns 0.
+ // The pseudo returning of the value 1 as a return from longjmp
+ // is implemented in longjmp.
+ return 0;
+}
+
+__attribute__((noreturn))
+inline void VG_MINIMAL_LONGJMP(VG_MINIMAL_JMP_BUF(_env))
+{
+ asm volatile(
+ // Loads to match the stores in the above setjmp implementation.
+ " ldp x19, x20, [%[_env], 0] \n"
+ " ldp x21, x22, [%[_env], 0x10] \n"
+ " ldp x23, x24, [%[_env], 0x20] \n"
+ " ldp x25, x26, [%[_env], 0x30] \n"
+ " ldp x27, x28, [%[_env], 0x40] \n"
+ " ldp x29, x30, [%[_env], 0x50] \n"
+ " ldr x9, [%[_env], 0x60] \n"
+ " mov sp, x9 \n"
+ // return as setjmp for the second time, returning 1.
+ // Since we have loaded the link register x30 from the saved buffer
+ // that was set by the above setjmp implementation, the 'ret' instruction
+ // here is going to return to where setjmp was called.
+ // Per the setjmp/longjmp contract, that pseudo second returning
+ // of setjmp should return the value 1.
+ // x0 is holds the integer return value.
+ " mov x0, 1 \n"
+ " ret \n"
+ :
+ // No outputs
+ :
+ // Inputs
+ [_env]"r"(_env)
+ :
+ // Clobbers.
+ // We have used x9 as a temporary
+ "x9");
+
+ // This statement is unreachable because the above asm statement
+ // unconditionally does a 'ret' instruction. The purpose of this
+ // statement is to silence clang warnings about this function returning
+ // while having the 'noreturn' attribute.
+ __builtin_unreachable();
+}
+
#else
/* The default implementation. */
--

File diff suppressed because it is too large Load Diff

View File

@ -1,154 +0,0 @@
From 3c8567894361a3373c573566cdf3615954c07f6f Mon Sep 17 00:00:00 2001
From: gaoxingwang <gaoxingwang@huawei.com>
Date: Wed, 9 Feb 2022 15:43:41 +0800
Subject: [PATCH] Generate a ENOSYS (sys_ni_syscall) for clone3 on all linux
arches
---
coregrind/m_syswrap/syswrap-amd64-linux.c | 1 +
coregrind/m_syswrap/syswrap-arm-linux.c | 1 +
coregrind/m_syswrap/syswrap-arm64-linux.c | 1 +
coregrind/m_syswrap/syswrap-mips32-linux.c | 1 +
coregrind/m_syswrap/syswrap-mips64-linux.c | 1 +
coregrind/m_syswrap/syswrap-nanomips-linux.c | 1 +
coregrind/m_syswrap/syswrap-ppc32-linux.c | 1 +
coregrind/m_syswrap/syswrap-ppc64-linux.c | 1 +
coregrind/m_syswrap/syswrap-s390x-linux.c | 1 +
coregrind/m_syswrap/syswrap-x86-linux.c | 1 +
include/vki/vki-scnums-shared-linux.h | 1 +
11 files changed, 11 insertions(+)
diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c
index 0aef84a..d0d7efa 100644
--- a/coregrind/m_syswrap/syswrap-amd64-linux.c
+++ b/coregrind/m_syswrap/syswrap-amd64-linux.c
@@ -873,6 +873,7 @@ static SyscallTableEntry syscall_table[] = {
LINXY(__NR_io_uring_setup, sys_io_uring_setup), // 425
LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
LINXY(__NR_io_uring_register, sys_io_uring_register), // 427
+ GENX_(__NR_clone3, sys_ni_syscall), // 435
};
SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno )
diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c
index db7ce10..ea703e3 100644
--- a/coregrind/m_syswrap/syswrap-arm-linux.c
+++ b/coregrind/m_syswrap/syswrap-arm-linux.c
@@ -1042,6 +1042,7 @@ static SyscallTableEntry syscall_main_table[] = {
LINXY(__NR_futex_time64, sys_futex_time64), // 422
LINXY(__NR_sched_rr_get_interval_time64,
sys_sched_rr_get_interval_time64), // 423
+ GENX_(__NR_clone3, sys_ni_syscall), // 435
};
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
index 3ae8d86..9a9a1f9 100644
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
@@ -825,6 +825,7 @@ static SyscallTableEntry syscall_main_table[] = {
// (__NR_pkey_free, sys_ni_syscall), // 290
LINXY(__NR_statx, sys_statx), // 397
+ GENX_(__NR_clone3, sys_ni_syscall), // 435
};
diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c
index c70bc21..8a7e395 100644
--- a/coregrind/m_syswrap/syswrap-mips32-linux.c
+++ b/coregrind/m_syswrap/syswrap-mips32-linux.c
@@ -1127,6 +1127,7 @@ static SyscallTableEntry syscall_main_table[] = {
LINXY(__NR_futex_time64, sys_futex_time64), // 422
LINXY(__NR_sched_rr_get_interval_time64,
sys_sched_rr_get_interval_time64), // 423
+ GENX_(__NR_clone3, sys_ni_syscall), // 435
};
SyscallTableEntry* ML_(get_linux_syscall_entry) (UInt sysno)
diff --git a/coregrind/m_syswrap/syswrap-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c
index f6624bb..06f82e6 100644
--- a/coregrind/m_syswrap/syswrap-mips64-linux.c
+++ b/coregrind/m_syswrap/syswrap-mips64-linux.c
@@ -810,6 +810,7 @@ static SyscallTableEntry syscall_main_table[] = {
LINX_ (__NR_syncfs, sys_syncfs),
LINXY (__NR_statx, sys_statx),
LINX_ (__NR_setns, sys_setns),
+ GENX_ (__NR_clone3, sys_ni_syscall),
};
SyscallTableEntry * ML_(get_linux_syscall_entry) ( UInt sysno )
diff --git a/coregrind/m_syswrap/syswrap-nanomips-linux.c b/coregrind/m_syswrap/syswrap-nanomips-linux.c
index 35a11ba..80c1a6f 100644
--- a/coregrind/m_syswrap/syswrap-nanomips-linux.c
+++ b/coregrind/m_syswrap/syswrap-nanomips-linux.c
@@ -820,6 +820,7 @@ static SyscallTableEntry syscall_main_table[] = {
// (__NR_pkey_mprotect, sys_ni_syscall),
// (__NR_pkey_alloc, sys_ni_syscall),
// (__NR_pkey_free, sys_ni_syscall),
+ GENX_ (__NR_clone3, sys_ni_syscall),
};
SyscallTableEntry* ML_(get_linux_syscall_entry) (UInt sysno)
diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c
index 8f8eec3..260b8b4 100644
--- a/coregrind/m_syswrap/syswrap-ppc32-linux.c
+++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c
@@ -1044,6 +1044,7 @@ static SyscallTableEntry syscall_table[] = {
LINXY(__NR_futex_time64, sys_futex_time64), // 422
LINXY(__NR_sched_rr_get_interval_time64,
sys_sched_rr_get_interval_time64), // 423
+ GENX_(__NR_clone3, sys_ni_syscall), // 435
};
SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno )
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
index d65a664..f29f0a2 100644
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
@@ -1010,6 +1010,7 @@ static SyscallTableEntry syscall_table[] = {
LINX_(__NR_pwritev2, sys_pwritev2), // 381
LINXY(__NR_statx, sys_statx), // 383
+ GENX_(__NR_clone3, sys_ni_syscall), // 435
};
SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno )
diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c
index 7655b4b..e0c0d5d 100644
--- a/coregrind/m_syswrap/syswrap-s390x-linux.c
+++ b/coregrind/m_syswrap/syswrap-s390x-linux.c
@@ -857,6 +857,7 @@ static SyscallTableEntry syscall_table[] = {
LINX_(__NR_pwritev2, sys_pwritev2), // 377
LINXY(__NR_statx, sys_statx), // 379
+ GENX_(__NR_clone3, sys_ni_syscall), // 435
};
SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno )
diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c
index e047e59..d432e32 100644
--- a/coregrind/m_syswrap/syswrap-x86-linux.c
+++ b/coregrind/m_syswrap/syswrap-x86-linux.c
@@ -1643,6 +1643,7 @@ static SyscallTableEntry syscall_table[] = {
LINXY(__NR_io_uring_setup, sys_io_uring_setup), // 425
LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
LINXY(__NR_io_uring_register, sys_io_uring_register),// 427
+ GENX_(__NR_clone3, sys_ni_syscall), // 435
};
SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno )
diff --git a/include/vki/vki-scnums-shared-linux.h b/include/vki/vki-scnums-shared-linux.h
index 6221d5a..963cd8e 100644
--- a/include/vki/vki-scnums-shared-linux.h
+++ b/include/vki/vki-scnums-shared-linux.h
@@ -38,5 +38,6 @@
#define __NR_fsconfig 431
#define __NR_fsmount 432
#define __NR_fspick 433
+#define __NR_clone3 435
#endif
--
2.27.0

View File

@ -0,0 +1,206 @@
From a43e62dddcf51ec6578a90c5988a41e856b44b05 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Sat, 18 Nov 2023 21:17:02 +0100
Subject: [PATCH] Add fchmodat2 syscall on linux
fchmodat2 is a new syscall on linux 6.6. It is a variant of fchmodat
that takes an extra flags argument.
https://bugs.kde.org/show_bug.cgi?id=477198
(cherry picked from commit 372d09fd9a8d76847c81092ebff71c80fd6c145d)
---
NEWS | 1 +
coregrind/m_syswrap/priv_syswrap-linux.h | 3 +++
coregrind/m_syswrap/syswrap-amd64-linux.c | 2 ++
coregrind/m_syswrap/syswrap-arm-linux.c | 2 ++
coregrind/m_syswrap/syswrap-arm64-linux.c | 2 ++
coregrind/m_syswrap/syswrap-linux.c | 11 +++++++++++
coregrind/m_syswrap/syswrap-mips32-linux.c | 2 ++
coregrind/m_syswrap/syswrap-mips64-linux.c | 1 +
coregrind/m_syswrap/syswrap-nanomips-linux.c | 1 +
coregrind/m_syswrap/syswrap-ppc32-linux.c | 2 ++
coregrind/m_syswrap/syswrap-ppc64-linux.c | 2 ++
coregrind/m_syswrap/syswrap-s390x-linux.c | 2 ++
coregrind/m_syswrap/syswrap-x86-linux.c | 2 ++
include/vki/vki-scnums-shared-linux.h | 2 ++
14 files changed, 35 insertions(+)
diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h
index 7c9decf5a..798c456c9 100644
--- a/coregrind/m_syswrap/priv_syswrap-linux.h
+++ b/coregrind/m_syswrap/priv_syswrap-linux.h
@@ -331,6 +331,9 @@ DECL_TEMPLATE(linux, sys_openat2);
// Linux-specific (new in Linux 5.14)
DECL_TEMPLATE(linux, sys_memfd_secret);
+// Since Linux 6.6
+DECL_TEMPLATE(linux, sys_fchmodat2);
+
/* ---------------------------------------------------------------------
Wrappers for sockets and ipc-ery. These are split into standalone
procedures because x86-linux hides them inside multiplexors
diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c
index 008600798..fe17d118b 100644
--- a/coregrind/m_syswrap/syswrap-amd64-linux.c
+++ b/coregrind/m_syswrap/syswrap-amd64-linux.c
@@ -886,6 +886,8 @@ static SyscallTableEntry syscall_table[] = {
LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441
LINXY(__NR_memfd_secret, sys_memfd_secret), // 447
+
+ LINX_(__NR_fchmodat2, sys_fchmodat2), // 452
};
SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno )
diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c
index 9a7a1e0d2..811931d3b 100644
--- a/coregrind/m_syswrap/syswrap-arm-linux.c
+++ b/coregrind/m_syswrap/syswrap-arm-linux.c
@@ -1059,6 +1059,8 @@ static SyscallTableEntry syscall_main_table[] = {
LINX_(__NR_faccessat2, sys_faccessat2), // 439
LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441
+
+ LINX_(__NR_fchmodat2, sys_fchmodat2), // 452
};
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
index 6af7bab83..3307bc2ca 100644
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
@@ -840,6 +840,8 @@ static SyscallTableEntry syscall_main_table[] = {
LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441
LINXY(__NR_memfd_secret, sys_memfd_secret), // 447
+
+ LINX_(__NR_fchmodat2, sys_fchmodat2), // 452
};
diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c
index d571fc327..efa47f2e6 100644
--- a/coregrind/m_syswrap/syswrap-linux.c
+++ b/coregrind/m_syswrap/syswrap-linux.c
@@ -6059,6 +6059,17 @@ PRE(sys_fchmodat)
PRE_MEM_RASCIIZ( "fchmodat(path)", ARG2 );
}
+PRE(sys_fchmodat2)
+{
+ PRINT("sys_fchmodat2 ( %ld, %#" FMT_REGWORD "x(%s), %" FMT_REGWORD "u, %"
+ FMT_REGWORD "u )",
+ SARG1, ARG2, (HChar*)(Addr)ARG2, ARG3, ARG4);
+ PRE_REG_READ4(long, "fchmodat2",
+ int, dfd, const char *, path, vki_mode_t, mode,
+ unsigned int, flags);
+ PRE_MEM_RASCIIZ( "fchmodat2(pathname)", ARG2 );
+}
+
PRE(sys_faccessat)
{
PRINT("sys_faccessat ( %ld, %#" FMT_REGWORD "x(%s), %ld )",
diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c
index 6268a00dd..74a1f6eac 100644
--- a/coregrind/m_syswrap/syswrap-mips32-linux.c
+++ b/coregrind/m_syswrap/syswrap-mips32-linux.c
@@ -1143,6 +1143,8 @@ static SyscallTableEntry syscall_main_table[] = {
LINX_ (__NR_faccessat2, sys_faccessat2), // 439
LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441
+
+ LINX_(__NR_fchmodat2, sys_fchmodat2), // 452
};
SyscallTableEntry* ML_(get_linux_syscall_entry) (UInt sysno)
diff --git a/coregrind/m_syswrap/syswrap-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c
index 6cdf25893..4e8508b7a 100644
--- a/coregrind/m_syswrap/syswrap-mips64-linux.c
+++ b/coregrind/m_syswrap/syswrap-mips64-linux.c
@@ -820,6 +820,7 @@ static SyscallTableEntry syscall_main_table[] = {
LINXY (__NR_close_range, sys_close_range),
LINX_ (__NR_faccessat2, sys_faccessat2),
LINXY(__NR_epoll_pwait2, sys_epoll_pwait2),
+ LINX_ (__NR_fchmodat2, sys_fchmodat2),
};
SyscallTableEntry * ML_(get_linux_syscall_entry) ( UInt sysno )
diff --git a/coregrind/m_syswrap/syswrap-nanomips-linux.c b/coregrind/m_syswrap/syswrap-nanomips-linux.c
index d724cde74..7859900c1 100644
--- a/coregrind/m_syswrap/syswrap-nanomips-linux.c
+++ b/coregrind/m_syswrap/syswrap-nanomips-linux.c
@@ -829,6 +829,7 @@ static SyscallTableEntry syscall_main_table[] = {
LINXY (__NR_close_range, sys_close_range),
LINX_ (__NR_faccessat2, sys_faccessat2),
LINXY (__NR_epoll_pwait2, sys_epoll_pwait2),
+ LINX_ (__NR_fchmodat2, sys_fchmodat2),
};
SyscallTableEntry* ML_(get_linux_syscall_entry) (UInt sysno)
diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c
index c0cfef235..1e19116ee 100644
--- a/coregrind/m_syswrap/syswrap-ppc32-linux.c
+++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c
@@ -1063,6 +1063,8 @@ static SyscallTableEntry syscall_table[] = {
LINX_(__NR_faccessat2, sys_faccessat2), // 439
LINXY (__NR_epoll_pwait2, sys_epoll_pwait2), // 441
+
+ LINX_ (__NR_fchmodat2, sys_fchmodat2), // 452
};
SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno )
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
index f5976f30c..1097212a4 100644
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
@@ -1032,6 +1032,8 @@ static SyscallTableEntry syscall_table[] = {
LINX_(__NR_faccessat2, sys_faccessat2), // 439
LINXY (__NR_epoll_pwait2, sys_epoll_pwait2), // 441
+
+ LINX_ (__NR_fchmodat2, sys_fchmodat2), // 452
};
SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno )
diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c
index afba154e7..3588672c7 100644
--- a/coregrind/m_syswrap/syswrap-s390x-linux.c
+++ b/coregrind/m_syswrap/syswrap-s390x-linux.c
@@ -873,6 +873,8 @@ static SyscallTableEntry syscall_table[] = {
LINX_(__NR_faccessat2, sys_faccessat2), // 439
LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441
+
+ LINX_ (__NR_fchmodat2, sys_fchmodat2), // 452
};
SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno )
diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c
index da4fd8fa2..58badc6b0 100644
--- a/coregrind/m_syswrap/syswrap-x86-linux.c
+++ b/coregrind/m_syswrap/syswrap-x86-linux.c
@@ -1658,6 +1658,8 @@ static SyscallTableEntry syscall_table[] = {
LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441
LINXY(__NR_memfd_secret, sys_memfd_secret), // 447
+
+ LINX_(__NR_fchmodat2, sys_fchmodat2), // 452
};
SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno )
diff --git a/include/vki/vki-scnums-shared-linux.h b/include/vki/vki-scnums-shared-linux.h
index 542382b53..a4cd87149 100644
--- a/include/vki/vki-scnums-shared-linux.h
+++ b/include/vki/vki-scnums-shared-linux.h
@@ -50,4 +50,6 @@
#define __NR_memfd_secret 447
+#define __NR_fchmodat2 452
+
#endif
--
2.39.3

View File

@ -0,0 +1,122 @@
commit 1d00e5ce0fb069911c4b525ec38289fb5d9021b0
Author: Paul Floyd <pjfloyd@wanadoo.fr>
Date: Sat Nov 18 08:49:34 2023 +0100
Bug 476548 - valgrind 3.22.0 fails on assertion when loading debuginfo file produced by mold
(cherry picked from commit 9ea4ae66707a4dcc6f4328e11911652e4418c585)
diff --git a/coregrind/m_debuginfo/image.c b/coregrind/m_debuginfo/image.c
index 02e509071..445f95555 100644
--- a/coregrind/m_debuginfo/image.c
+++ b/coregrind/m_debuginfo/image.c
@@ -1221,6 +1221,20 @@ Int ML_(img_strcmp_c)(DiImage* img, DiOffT off1, const HChar* str2)
}
}
+Int ML_(img_strcmp_n)(DiImage* img, DiOffT off1, const HChar* str2, Word n)
+{
+ ensure_valid(img, off1, 1, "ML_(img_strcmp_c)");
+ while (n) {
+ UChar c1 = get(img, off1);
+ UChar c2 = *(const UChar*)str2;
+ if (c1 < c2) return -1;
+ if (c1 > c2) return 1;
+ if (c1 == 0) return 0;
+ off1++; str2++; --n;
+ }
+ return 0;
+}
+
UChar ML_(img_get_UChar)(DiImage* img, DiOffT offset)
{
ensure_valid(img, offset, 1, "ML_(img_get_UChar)");
diff --git a/coregrind/m_debuginfo/priv_image.h b/coregrind/m_debuginfo/priv_image.h
index a49846f14..c91e49f01 100644
--- a/coregrind/m_debuginfo/priv_image.h
+++ b/coregrind/m_debuginfo/priv_image.h
@@ -115,6 +115,10 @@ Int ML_(img_strcmp)(DiImage* img, DiOffT off1, DiOffT off2);
cast to HChar before comparison. */
Int ML_(img_strcmp_c)(DiImage* img, DiOffT off1, const HChar* str2);
+/* Do strncmp of a C string in the image vs a normal one. Chars are
+ cast to HChar before comparison. */
+Int ML_(img_strcmp_n)(DiImage* img, DiOffT off1, const HChar* str2, Word n);
+
/* Do strlen of a C string in the image. */
SizeT ML_(img_strlen)(DiImage* img, DiOffT off);
diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c
index fb64ed976..46f8c8343 100644
--- a/coregrind/m_debuginfo/readelf.c
+++ b/coregrind/m_debuginfo/readelf.c
@@ -2501,8 +2501,7 @@ Bool ML_(read_elf_object) ( struct _DebugInfo* di )
di->rodata_avma += inrw1->bias;
di->rodata_bias = inrw1->bias;
di->rodata_debug_bias = inrw1->bias;
- }
- else {
+ } else {
BAD(".rodata"); /* should not happen? */
}
di->rodata_present = True;
@@ -2977,6 +2976,46 @@ Bool ML_(read_elf_object) ( struct _DebugInfo* di )
return retval;
}
+static void find_rodata(Word i, Word shnum, DiImage* dimg, struct _DebugInfo* di, DiOffT shdr_dioff,
+ UWord shdr_dent_szB, DiOffT shdr_strtab_dioff, PtrdiffT rw_dbias)
+{
+ ElfXX_Shdr a_shdr;
+ ElfXX_Shdr a_extra_shdr;
+ ML_(img_get)(&a_shdr, dimg,
+ INDEX_BIS(shdr_dioff, i, shdr_dent_szB),
+ sizeof(a_shdr));
+ if (di->rodata_present &&
+ 0 == ML_(img_strcmp_c)(dimg, shdr_strtab_dioff
+ + a_shdr.sh_name, ".rodata")) {
+ Word sh_size = a_shdr.sh_size;
+ Word j;
+ Word next_addr = a_shdr.sh_addr + a_shdr.sh_size;
+ for (j = i + 1; j < shnum; ++j) {
+ ML_(img_get)(&a_extra_shdr, dimg,
+ INDEX_BIS(shdr_dioff, j, shdr_dent_szB),
+ sizeof(a_shdr));
+ if (0 == ML_(img_strcmp_n)(dimg, shdr_strtab_dioff
+ + a_extra_shdr.sh_name, ".rodata", 7)) {
+ if (a_extra_shdr.sh_addr ==
+ VG_ROUNDUP(next_addr, a_extra_shdr.sh_addralign)) {
+ sh_size = VG_ROUNDUP(sh_size, a_extra_shdr.sh_addralign) + a_extra_shdr.sh_size;
+ }
+ next_addr = a_extra_shdr.sh_addr + a_extra_shdr.sh_size;
+ } else {
+ break;
+ }
+ }
+ vg_assert(di->rodata_size == sh_size);
+ vg_assert(di->rodata_avma + a_shdr.sh_addr + rw_dbias);
+ di->rodata_debug_svma = a_shdr.sh_addr;
+ di->rodata_debug_bias = di->rodata_bias +
+ di->rodata_svma - di->rodata_debug_svma;
+ TRACE_SYMTAB("acquiring .rodata debug svma = %#lx .. %#lx\n",
+ di->rodata_debug_svma,
+ di->rodata_debug_svma + di->rodata_size - 1);
+ TRACE_SYMTAB("acquiring .rodata debug bias = %#lx\n", (UWord)di->rodata_debug_bias);
+ }
+}
Bool ML_(read_elf_debug) ( struct _DebugInfo* di )
{
Word i, j;
@@ -3391,7 +3430,11 @@ Bool ML_(read_elf_debug) ( struct _DebugInfo* di )
FIND(text, rx)
FIND(data, rw)
FIND(sdata, rw)
- FIND(rodata, rw)
+ // https://bugs.kde.org/show_bug.cgi?id=476548
+ // special handling for rodata as adjacent
+ // rodata sections may have been merged in ML_(read_elf_object)
+ //FIND(rodata, rw)
+ find_rodata(i, ehdr_dimg.e_shnum, dimg, di, shdr_dioff, shdr_dent_szB, shdr_strtab_dioff, rw_dbias);
FIND(bss, rw)
FIND(sbss, rw)

View File

@ -0,0 +1,32 @@
commit 0fbfbe05028ad18efda786a256a2738d2c231ed4
Author: Mark Wielaard <mark@klomp.org>
Date: Fri Nov 17 13:31:52 2023 +0100
valgrind-monitor.py regular expressions should use raw strings
With python 3.12 gdb will produce the following SyntaxWarning when
loading valgrind-monitor-def.py:
/usr/share/gdb/auto-load/valgrind-monitor-def.py:214:
SyntaxWarning: invalid escape sequence '\['
if re.fullmatch("^0x[0123456789ABCDEFabcdef]+\[[^\[\]]+\]$", arg_str):
In a future python version this will become an SyntaxError.
Use a raw strings for the regular expression.
https://bugs.kde.org/show_bug.cgi?id=476708
diff --git a/coregrind/m_gdbserver/valgrind-monitor-def.py b/coregrind/m_gdbserver/valgrind-monitor-def.py
index b4e7b992d..d74b1590c 100644
--- a/coregrind/m_gdbserver/valgrind-monitor-def.py
+++ b/coregrind/m_gdbserver/valgrind-monitor-def.py
@@ -211,7 +211,7 @@ class Valgrind_ADDR_LEN_opt(Valgrind_Command):
For compatibility reason with the Valgrind gdbserver monitor command,
we detect and accept usages such as 0x1234ABCD[10]."""
def invoke(self, arg_str : str, from_tty : bool) -> None:
- if re.fullmatch("^0x[0123456789ABCDEFabcdef]+\[[^\[\]]+\]$", arg_str):
+ if re.fullmatch(r"^0x[0123456789ABCDEFabcdef]+\[[^\[\]]+\]$", arg_str):
arg_str = arg_str.replace("[", " ")
arg_str = arg_str.replace("]", " ")
eval_execute_2(self, arg_str,

View File

@ -1,15 +0,0 @@
--- valgrind/glibc-2.34567-NPTL-helgrind.supp.jj 2009-08-19 15:37:48.000000000 +0200
+++ valgrind/glibc-2.34567-NPTL-helgrind.supp 2009-10-21 16:46:31.000000000 +0200
@@ -88,6 +88,12 @@
obj:*/lib*/libpthread-2.*so*
}
{
+ helgrind-glibc2X-102a
+ Helgrind:Race
+ fun:mythread_wrapper
+ obj:*vgpreload_helgrind*.so
+}
+{
helgrind-glibc2X-103
Helgrind:Race
fun:pthread_cond_*@@GLIBC_2.*

View File

@ -1,203 +0,0 @@
From 64c0d0ffbe9ee5c1c4399bc998a2602c0848b70b Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Wed, 2 Mar 2022 21:07:09 -0500
Subject: [PATCH] valgrind: Implement linux rseq syscall as ENOSYS
This implements rseq for amd64, arm, arm64, ppc32, ppc64,
s390x and x86 linux as ENOSYS (without warning).
glibc will start using rseq to accelerate sched_getcpu, if
available. This would cause a warning from valgrind every
time a new thread is started.
Real rseq (restartable sequences) support is pretty hard, so
for now just explicitly return ENOSYS (just like we do for clone3).
https://sourceware.org/pipermail/libc-alpha/2021-December/133656.html
-----
conflicts:
context conflicts
---
coregrind/m_syswrap/syswrap-amd64-linux.c | 2 ++
coregrind/m_syswrap/syswrap-arm-linux.c | 1 +
coregrind/m_syswrap/syswrap-arm64-linux.c | 4 +++-
coregrind/m_syswrap/syswrap-ppc32-linux.c | 2 ++
coregrind/m_syswrap/syswrap-ppc64-linux.c | 3 +++
coregrind/m_syswrap/syswrap-s390x-linux.c | 3 +++
coregrind/m_syswrap/syswrap-x86-linux.c | 2 ++
include/vki/vki-scnums-arm-linux.h | 1 +
include/vki/vki-scnums-arm64-linux.h | 4 +++-
include/vki/vki-scnums-ppc32-linux.h | 1 +
include/vki/vki-scnums-ppc64-linux.h | 1 +
include/vki/vki-scnums-s390x-linux.h | 5 ++++-
12 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c
index d0d7efa..5cd630f 100644
--- a/coregrind/m_syswrap/syswrap-amd64-linux.c
+++ b/coregrind/m_syswrap/syswrap-amd64-linux.c
@@ -862,6 +862,8 @@ static SyscallTableEntry syscall_table[] = {
LINXY(__NR_statx, sys_statx), // 332
+ GENX_(__NR_rseq, sys_ni_syscall), // 334
+
LINX_(__NR_membarrier, sys_membarrier), // 324
LINX_(__NR_copy_file_range, sys_copy_file_range), // 326
diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c
index ea703e3..8dbe3bc 100644
--- a/coregrind/m_syswrap/syswrap-arm-linux.c
+++ b/coregrind/m_syswrap/syswrap-arm-linux.c
@@ -1020,6 +1020,7 @@ static SyscallTableEntry syscall_main_table[] = {
LINX_(__NR_pwritev2, sys_pwritev2), // 393
LINXY(__NR_statx, sys_statx), // 397
+ GENX_(__NR_rseq, sys_ni_syscall), // 398
LINXY(__NR_clock_gettime64, sys_clock_gettime64), // 403
LINX_(__NR_clock_settime64, sys_clock_settime64), // 404
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
index 9a9a1f9..76e14fa 100644
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
@@ -823,8 +823,10 @@ static SyscallTableEntry syscall_main_table[] = {
// (__NR_pkey_mprotect, sys_ni_syscall), // 288
// (__NR_pkey_alloc, sys_ni_syscall), // 289
// (__NR_pkey_free, sys_ni_syscall), // 290
+ LINXY(__NR_statx, sys_statx), // 291
+
+ GENX_(__NR_rseq, sys_ni_syscall), // 293
- LINXY(__NR_statx, sys_statx), // 397
GENX_(__NR_clone3, sys_ni_syscall), // 435
};
diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c
index 260b8b4..f07fb8e 100644
--- a/coregrind/m_syswrap/syswrap-ppc32-linux.c
+++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c
@@ -1023,6 +1023,8 @@ static SyscallTableEntry syscall_table[] = {
LINXY(__NR_statx, sys_statx), // 383
+ GENX_(__NR_rseq, sys_ni_syscall), // 387
+
LINXY(__NR_clock_gettime64, sys_clock_gettime64), // 403
LINX_(__NR_clock_settime64, sys_clock_settime64), // 404
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
index f29f0a2..106b56c 100644
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
@@ -1010,6 +1010,9 @@ static SyscallTableEntry syscall_table[] = {
LINX_(__NR_pwritev2, sys_pwritev2), // 381
LINXY(__NR_statx, sys_statx), // 383
+
+ GENX_(__NR_rseq, sys_ni_syscall), // 387
+
GENX_(__NR_clone3, sys_ni_syscall), // 435
};
diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c
index e0c0d5d..9756d23 100644
--- a/coregrind/m_syswrap/syswrap-s390x-linux.c
+++ b/coregrind/m_syswrap/syswrap-s390x-linux.c
@@ -857,6 +857,9 @@ static SyscallTableEntry syscall_table[] = {
LINX_(__NR_pwritev2, sys_pwritev2), // 377
LINXY(__NR_statx, sys_statx), // 379
+
+ GENX_(__NR_rseq, sys_ni_syscall), // 381
+
GENX_(__NR_clone3, sys_ni_syscall), // 435
};
diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c
index d432e32..d29f82c 100644
--- a/coregrind/m_syswrap/syswrap-x86-linux.c
+++ b/coregrind/m_syswrap/syswrap-x86-linux.c
@@ -1618,6 +1618,8 @@ static SyscallTableEntry syscall_table[] = {
/* Explicitly not supported on i386 yet. */
GENX_(__NR_arch_prctl, sys_ni_syscall), // 384
+ GENX_(__NR_rseq, sys_ni_syscall), // 386
+
LINXY(__NR_clock_gettime64, sys_clock_gettime64), // 403
LINX_(__NR_clock_settime64, sys_clock_settime64), // 404
diff --git a/include/vki/vki-scnums-arm-linux.h b/include/vki/vki-scnums-arm-linux.h
index ff560e1..485db8b 100644
--- a/include/vki/vki-scnums-arm-linux.h
+++ b/include/vki/vki-scnums-arm-linux.h
@@ -432,6 +432,7 @@
#define __NR_pkey_alloc 395
#define __NR_pkey_free 396
#define __NR_statx 397
+#define __NR_rseq 398
diff --git a/include/vki/vki-scnums-arm64-linux.h b/include/vki/vki-scnums-arm64-linux.h
index 9aa3b2b..acdfb39 100644
--- a/include/vki/vki-scnums-arm64-linux.h
+++ b/include/vki/vki-scnums-arm64-linux.h
@@ -323,9 +323,11 @@
#define __NR_pkey_alloc 289
#define __NR_pkey_free 290
#define __NR_statx 291
+#define __NR_io_pgetevents 291
+#define __NR_rseq 293
#undef __NR_syscalls
-#define __NR_syscalls 292
+#define __NR_syscalls 294
///*
// * All syscalls below here should go away really,
diff --git a/include/vki/vki-scnums-ppc32-linux.h b/include/vki/vki-scnums-ppc32-linux.h
index 6987ad9..08fa77d 100644
--- a/include/vki/vki-scnums-ppc32-linux.h
+++ b/include/vki/vki-scnums-ppc32-linux.h
@@ -415,6 +415,7 @@
#define __NR_pkey_alloc 384
#define __NR_pkey_free 385
#define __NR_pkey_mprotect 386
+#define __NR_rseq 387
#endif /* __VKI_SCNUMS_PPC32_LINUX_H */
diff --git a/include/vki/vki-scnums-ppc64-linux.h b/include/vki/vki-scnums-ppc64-linux.h
index 6827964..507117b 100644
--- a/include/vki/vki-scnums-ppc64-linux.h
+++ b/include/vki/vki-scnums-ppc64-linux.h
@@ -407,6 +407,7 @@
#define __NR_pkey_alloc 384
#define __NR_pkey_free 385
#define __NR_pkey_mprotect 386
+#define __NR_pkey_rseq 387
#endif /* __VKI_SCNUMS_PPC64_LINUX_H */
diff --git a/include/vki/vki-scnums-s390x-linux.h b/include/vki/vki-scnums-s390x-linux.h
index f386170..51cc572 100644
--- a/include/vki/vki-scnums-s390x-linux.h
+++ b/include/vki/vki-scnums-s390x-linux.h
@@ -340,8 +340,11 @@
#define __NR_s390_guarded_storage 378
#define __NR_statx 379
#define __NR_s390_sthyi 380
+#define __NR_kexec_file_load 381
+#define __NR_io_pgetevents 382
+#define __NR_rseq 383
-#define NR_syscalls 381
+#define NR_syscalls 384
/*
* There are some system calls that are not present on 64 bit, some
--
2.27.0

View File

@ -14,24 +14,39 @@
%define arch_val loongarch64 %define arch_val loongarch64
%define arch_old_val %{nil} %define arch_old_val %{nil}
%endif %endif
%ifarch ppc64le
%define arch_val ppc64le
%define arch_old_val %{nil}
%endif
Name: valgrind Name: valgrind
Version: 3.16.0 Version: 3.22.0
Release: 5 Release: 3
Epoch: 1 Epoch: 1
Summary: An instrumentation framework for building dynamic analysis tools Summary: An instrumentation framework for building dynamic analysis tools
License: GPLv2+ License: GPLv2+
URL: http://www.valgrind.org/ URL: http://www.valgrind.org/
Source0: ftp://sourceware.org/pub/%{name}/%{name}-%{version}.tar.bz2 Source0: https://sourceware.org/pub/%{name}/%{name}-%{version}.tar.bz2
Patch1: valgrind-3.9.0-cachegrind-improvements.patch Patch1: valgrind-3.9.0-cachegrind-improvements.patch
Patch2: valgrind-3.9.0-helgrind-race-supp.patch Patch2: valgrind-3.9.0-ldso-supp.patch
Patch3: valgrind-3.9.0-ldso-supp.patch %if "%{toolchain}" == "clang"
Patch4: backport-Generate-a-ENOSYS-sys_ni_syscall-for-clone3-on-all-linux-arches.patch Patch3: Add-AArch64-clang-longjmp-support.patch
Patch5: valgrind-Implement-linux-rseq-syscall-as-ENOSYS.patch %endif
Patch6: Add-LOONGARCH64-Linux-support.patch # Add LOONGARCH64 support
Patch4: Add-LOONGARCH64-Linux-support.patch
# valgrind-monitor.py regular expressions should use raw strings
# https://bugs.kde.org/show_bug.cgi?id=476708
Patch5: valgrind-3.22.0-valgrind-monitor-python-re.patch
# valgrind 3.22.0 fails on assertion when loading debuginfo
# https://bugs.kde.org/show_bug.cgi?id=476548
Patch6: valgrind-3.22.0-rodata.patch
# Add fchmodat2 syscall on linux
# https://bugs.kde.org/show_bug.cgi?id=477198
Patch7: valgrind-3.22.0-fchmodat2.patch
BuildRequires: glibc glibc-devel gdb procps gcc-c++ perl(Getopt::Long) BuildRequires: glibc glibc-devel gdb procps gcc-c++ perl(Getopt::Long)
BuildRequires: automake autoconf
%description %description
Valgrind is an instrumentation framework for building dynamic analysis tools. There are Valgrind is an instrumentation framework for building dynamic analysis tools. There are
@ -51,12 +66,15 @@ This files contains the development files for %{name}.
%autosetup -n %{name}-%{version} -p1 %autosetup -n %{name}-%{version} -p1
%build %build
CC=gcc # Some patches (might) touch Makefile.am or configure.ac files.
# Just always autoreconf so we don't need patches to prebuild files.
./autogen.sh
CC=%{__cc}
%ifarch x86_64 %ifarch x86_64
mkdir -p shared/libgcc/32 mkdir -p shared/libgcc/32
ar r shared/libgcc/32/libgcc_s.a ar r shared/libgcc/32/libgcc_s.a
ar r shared/libgcc/libgcc_s_32.a ar r shared/libgcc/libgcc_s_32.a
CC="gcc -B `pwd`/shared/libgcc/" CC="%{__cc} -B `pwd`/shared/libgcc/"
%endif %endif
%undefine _hardened_build %undefine _hardened_build
@ -72,13 +90,6 @@ OPTFLAGS="`echo " $optflags " | sed 's/ -m\(64\|3[21]\) / /g;s/ -fexceptions / /
pushd %{buildroot}%{_libdir}/valgrind/ pushd %{buildroot}%{_libdir}/valgrind/
rm -f *.supp.in *.a rm -f *.supp.in *.a
%if "%{arch_old_val}" != ""
rm -f *-%{arch_old_val}-* || :
for i in *-%{arch_val}-*; do
j=`echo $i | sed 's/-%{arch_val}-/-%{arch_old_val}-/'`
ln -sf ../../lib/valgrind/$j $j
done
%endif
popd popd
pushd %{buildroot}%{_includedir}/%{name} pushd %{buildroot}%{_includedir}/%{name}
@ -90,13 +101,9 @@ popd
%doc %{_datadir}/doc/%{name}/{html,*.pdf} %doc %{_datadir}/doc/%{name}/{html,*.pdf}
%exclude %{_datadir}/doc/%{name}/*.ps %exclude %{_datadir}/doc/%{name}/*.ps
%{_bindir}/* %{_bindir}/*
%dir %{_libdir}/%{name} %dir %{_libexecdir}/%{name}
%{_libdir}/%{name}/*[^ao] %{_libexecdir}/valgrind/*[^o]
%attr(0755,root,root) %{_libdir}/valgrind/vgpreload*-%{arch_val}-*so %attr(0755,root,root) %{_libexecdir}/valgrind/vgpreload*-%{arch_val}-*so
%if "%{arch_old_val}" != ""
%{_libdir}/%{name}/vgpreload*-%{arch_old_val}-*so
%endif
%{_libexecdir}/valgrind/*
%files devel %files devel
%{_includedir}/%{name} %{_includedir}/%{name}
@ -107,6 +114,21 @@ popd
%{_mandir}/man1/* %{_mandir}/man1/*
%changelog %changelog
* Tue Jan 14 2025 Ge Wang <wang__ge@126.com> - 1:3.22.0-3
- Remove empty soft link file
* Mon Jan 22 2024 peng.zou <peng.zou@shingroup.cn> - 1:3.22.0-2
- Add ppc64le support
* Mon Jan 08 2024 yaoxin <yao_xin001@hoperun.com> - 1:3.22.0-1
- Upgrade to 3.22.0
* Tue Aug 29 2023 liyunfei <liyunfei33@huawei.com> - 1:3.16.0-7
- Add clang compile support on AArch64
* Tue Jan 03 2023 chenfeiyang <chenfeiyang@loongson.cn> - 1:3.16.0-6
- Sync LoongArch with glibc 2.36
* Fri Dec 16 2022 chenfeiyang <chenfeiyang@loongson.cn> - 1:3.16.0-5 * Fri Dec 16 2022 chenfeiyang <chenfeiyang@loongson.cn> - 1:3.16.0-5
- Add LOONGARCH64/Linux support - Add LOONGARCH64/Linux support