summaryrefslogtreecommitdiff
path: root/user/valgrind
diff options
context:
space:
mode:
Diffstat (limited to 'user/valgrind')
-rw-r--r--user/valgrind/0001-Ensure-ELFv2-is-supported-on-PPC64.patch7
-rw-r--r--user/valgrind/APKBUILD30
-rw-r--r--user/valgrind/ppc32.patch15
-rw-r--r--user/valgrind/ppc64-support-tkill.patch14
-rw-r--r--user/valgrind/realloc.patch24
-rw-r--r--user/valgrind/suppressions.patch24
-rw-r--r--user/valgrind/uclibc.patch10
7 files changed, 45 insertions, 79 deletions
diff --git a/user/valgrind/0001-Ensure-ELFv2-is-supported-on-PPC64.patch b/user/valgrind/0001-Ensure-ELFv2-is-supported-on-PPC64.patch
index 5d7dbe29c..247657759 100644
--- a/user/valgrind/0001-Ensure-ELFv2-is-supported-on-PPC64.patch
+++ b/user/valgrind/0001-Ensure-ELFv2-is-supported-on-PPC64.patch
@@ -302,12 +302,13 @@ diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c
index df842aa..de37070 100644
--- a/coregrind/m_machine.c
+++ b/coregrind/m_machine.c
-@@ -2073,7 +2073,8 @@ void* VG_(fnptr_to_fnentry)( void* f )
+@@ -2073,8 +2073,9 @@ void* VG_(fnptr_to_fnentry)( void* f )
|| defined(VGP_ppc32_linux) || defined(VGP_ppc64le_linux) \
|| defined(VGP_s390x_linux) || defined(VGP_mips32_linux) \
|| defined(VGP_mips64_linux) || defined(VGP_arm64_linux) \
-- || defined(VGP_x86_solaris) || defined(VGP_amd64_solaris)
-+ || defined(VGP_x86_solaris) || defined(VGP_amd64_solaris) \
+ || defined(VGP_x86_solaris) || defined(VGP_amd64_solaris) \
+- || defined(VGP_nanomips_linux)
++ || defined(VGP_nanomips_linux) \
+ || (defined(VGP_ppc64be_linux) && !defined(VG_PLAT_USES_PPCTOC))
return f;
# elif defined(VGP_ppc64be_linux)
diff --git a/user/valgrind/APKBUILD b/user/valgrind/APKBUILD
index f676d18e8..b64d13df7 100644
--- a/user/valgrind/APKBUILD
+++ b/user/valgrind/APKBUILD
@@ -1,36 +1,34 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=valgrind
-pkgver=3.15.0
+pkgver=3.21.0
pkgrel=0
pkgdesc="A tool to help find memory-management problems in programs"
-url="http://valgrind.org/"
+url="https://valgrind.org/"
arch="all"
-license="GPL-2.0+"
-makedepends="autoconf automake libtool bash perl cmd:which"
# from README_PACKAGERS:
# Don't strip the debug info off lib/valgrind/$platform/vgpreload*.so
# in the installation tree. Either Valgrind won't work at all, or it
# will still work if you do, but will generate less helpful error
# messages.
options="!strip !check"
+license="GPL-2.0+"
+depends=""
+makedepends="autoconf automake libtool bash perl cmd:which"
subpackages="$pkgname-dev $pkgname-doc"
source="ftp://sourceware.org/pub/$pkgname/$pkgname-$pkgver.tar.bz2
0001-Ensure-ELFv2-is-supported-on-PPC64.patch
arm.patch
- realloc.patch
- suppressions.patch
- uclibc.patch
+ ppc32.patch
+ ppc64-support-tkill.patch
"
prepare() {
default_prepare
- cd "$builddir"
aclocal && autoconf && automake --add-missing
echo '#include <linux/a.out.h>' > include/a.out.h
}
build() {
- cd "$builddir"
# fails to build with ccache
export CC="gcc"
export CFLAGS="$CFLAGS -fno-stack-protector -no-pie"
@@ -47,12 +45,10 @@ build() {
}
check() {
- cd "$buildir"
make check
}
package() {
- cd "$builddir"
make DESTDIR="$pkgdir" install
# we have options=!strip above so we strip the /usr/bin/* manually
@@ -60,14 +56,12 @@ package() {
strip "$pkgdir"/usr/bin/valgrind \
"$pkgdir"/usr/bin/valgrind-di-server \
"$pkgdir"/usr/bin/vgdb \
- "$pkgdir"/usr/bin/valgrind-listener \
- "$pkgdir"/usr/bin/cg_merge
+ "$pkgdir"/usr/bin/valgrind-listener
fi
}
-sha512sums="5695d1355226fb63b0c80809ed43bb077b6eed4d427792d9d7ed944c38b557a84fe3c783517b921e32f161228e10e4625bea0550faa4685872bb4454450cfa7f valgrind-3.15.0.tar.bz2
-250177c3f50940560de9ad885cf5d9d7aa060ac832ced04875e1109b9114ec34e358a5c2309c8548f657e293cf50d980306d47b2cdf5e429aeabd10ffe666104 0001-Ensure-ELFv2-is-supported-on-PPC64.patch
+sha512sums="3e86cda2f2d6cd30807fac7933ba2c46a97a2b4a868db989e6b0cceeadf029af7ee34ba900466a346948289aacb30f4399799bb83b97cc49a4d2d810441e5cfd valgrind-3.21.0.tar.bz2
+f90aa3cef5d3561d4602ff63b8f355b8427cbe6bb2ecd6bfc2e2bb063915fa40a70d923dbc60a643ee3fb7bcfbbddac049c6f6133c541189dd82b891f7ad9dbc 0001-Ensure-ELFv2-is-supported-on-PPC64.patch
9ee297d1b2b86891584443ad0caadc4977e1447979611ccf1cc55dbee61911b0b063bc4ad936d86c451cedae410cb3219b5a088b2ad0aa17df182d564fe36cfe arm.patch
-57086a768f3876b26b0e507bc159a73f0955f03d5af8cc30e21103e348ca67f2e58b5555a5a97f299751c6602692ad43d8346bb68a80917d740fb4d65bba9665 realloc.patch
-d011b2769d35ca3206967e6dac9f3fb24a6496e5bbfdc73342382245c89375b09d6948b10ba3cf8aa0050c79c0dd13b75764aec0ec5c6ac479fa930941067747 suppressions.patch
-d59a10db9037e120df2ee94a103402ca95a79abee9d8be63e4e1bca29c82dca775cc402a79b854ec11a2160a4d2da202c237369418e221d1925267ea2613fd5d uclibc.patch"
+25804fafe2372808c29233ec7415a94633ef17c72c9bd1d78a5c1da53fad2ed8e76da2d0923ff0a73fad8a86b7709c5ea3774b35be6a5b4c1ef1a55bc86b2c18 ppc32.patch
+daf819d0f9bbbaf4243c7bf931fed840f1f55304df1b45d4a72ceaf8403b8e0e1fc8079343b86106f0741aa812560a466389d7d3878c5547f3ff7a9e46e63df7 ppc64-support-tkill.patch"
diff --git a/user/valgrind/ppc32.patch b/user/valgrind/ppc32.patch
new file mode 100644
index 000000000..093eae132
--- /dev/null
+++ b/user/valgrind/ppc32.patch
@@ -0,0 +1,15 @@
+--- valgrind-3.21.0/VEX/priv/main_main.c.old 2023-01-07 14:48:48.000000000 +0000
++++ valgrind-3.21.0/VEX/priv/main_main.c 2024-10-01 21:53:47.879017945 +0000
+@@ -2047,10 +2047,10 @@
+ }
+
+ /* ISA 3.0 not supported on 32-bit machines */
+- if ((hwcaps & VEX_HWCAPS_PPC32_ISA3_0) != 0) {
++ /*if ((hwcaps & VEX_HWCAPS_PPC32_ISA3_0) != 0) {
+ invalid_hwcaps(arch, hwcaps,
+ "ISA 3.0 not supported in 32-bit mode \n");
+- }
++ }*/
+ return;
+ }
+
diff --git a/user/valgrind/ppc64-support-tkill.patch b/user/valgrind/ppc64-support-tkill.patch
new file mode 100644
index 000000000..b763be05e
--- /dev/null
+++ b/user/valgrind/ppc64-support-tkill.patch
@@ -0,0 +1,14 @@
+On musl, the generic support works fine.
+
+This prevents spurious memcheck and cachegrind failures on ppc64.
+--- valgrind-3.19.0/coregrind/m_syswrap/syswrap-ppc64-linux.c.old 2022-06-11 03:12:37.140000000 -0500
++++ valgrind-3.19.0/coregrind/m_syswrap/syswrap-ppc64-linux.c 2022-06-11 03:13:33.550000000 -0500
+@@ -852,7 +852,7 @@
+ GENX_(__NR_madvise, sys_madvise), // 205
+ // _____(__NR_mincore, sys_mincore), // 206
+ LINX_(__NR_gettid, sys_gettid), // 207
+-// _____(__NR_tkill, sys_tkill), // 208
++ LINXY(__NR_tkill, sys_tkill), // 208
+ LINX_(__NR_setxattr, sys_setxattr), // 209
+
+ LINX_(__NR_lsetxattr, sys_lsetxattr), // 210
diff --git a/user/valgrind/realloc.patch b/user/valgrind/realloc.patch
deleted file mode 100644
index d0eb795b8..000000000
--- a/user/valgrind/realloc.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c
-+++ valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c
-@@ -765,13 +765,15 @@ static void init(void);
- DO_INIT; \
- MALLOC_TRACE("realloc(%p,%llu)", ptrV, (ULong)new_size ); \
- \
-- if (ptrV == NULL) \
-- /* We need to call a malloc-like function; so let's use \
-- one which we know exists. */ \
-- return VG_REPLACE_FUNCTION_EZU(10010,VG_Z_LIBC_SONAME,malloc) \
-- (new_size); \
-+ if (ptrV == NULL) { \
-+ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(new_size); \
-+ v = (void*)VALGRIND_NON_SIMD_CALL1( info.tl_malloc, new_size ); \
-+ MALLOC_TRACE(" = %p\n", v ); \
-+ return v; \
-+ } \
- if (new_size <= 0) { \
-- VG_REPLACE_FUNCTION_EZU(10050,VG_Z_LIBC_SONAME,free)(ptrV); \
-+ if (ptrV != NULL) \
-+ VALGRIND_NON_SIMD_CALL1( info.tl_free, ptrV ); \
- MALLOC_TRACE(" = 0\n"); \
- return NULL; \
- } \
diff --git a/user/valgrind/suppressions.patch b/user/valgrind/suppressions.patch
deleted file mode 100644
index a91b93fdf..000000000
--- a/user/valgrind/suppressions.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- valgrind-3.13.0/configure.ac.old 2017-06-15 13:37:01.000000000 +0000
-+++ valgrind-3.13.0/configure.ac 2018-10-02 21:46:48.710000000 +0000
-@@ -1034,7 +1034,7 @@
- musl)
- AC_MSG_RESULT(Musl)
- AC_DEFINE([MUSL_LIBC], 1, [Define to 1 if you're using Musl libc])
-- # no DEFAULT_SUPP file yet for musl libc.
-+ DEFAULT_SUPP="musl.supp ${DEFAULT_SUPP}"
- ;;
- 2.0|2.1|*)
- AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
---- /dev/null 2018-07-03 06:46:12.010000000 +0000
-+++ valgrind-3.13.0/musl.supp 2018-10-02 21:44:57.240000000 +0000
-@@ -0,0 +1,10 @@
-+# musl does not free `dso` structs allocated during linking on exit.
-+{
-+ musl:dynlinker
-+ Memcheck:Leak
-+ match-leak-kinds: reachable
-+ fun:calloc
-+ ...
-+ fun:__dls3
-+ obj:/lib/ld-musl-*
-+}
diff --git a/user/valgrind/uclibc.patch b/user/valgrind/uclibc.patch
deleted file mode 100644
index 69281ab2c..000000000
--- a/user/valgrind/uclibc.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./coregrind/vg_preloaded.c.orig
-+++ ./coregrind/vg_preloaded.c
-@@ -42,6 +42,7 @@
- originates from Valgrind.
- ------------------------------------------------------------------ */
-
-+#include <features.h>
- #include "pub_core_basics.h"
- #include "pub_core_clreq.h"
- #include "pub_core_debuginfo.h" // Needed for pub_core_redir.h