diff options
Diffstat (limited to 'main/valgrind/APKBUILD')
-rw-r--r-- | main/valgrind/APKBUILD | 71 |
1 files changed, 36 insertions, 35 deletions
diff --git a/main/valgrind/APKBUILD b/main/valgrind/APKBUILD index 42296032dbe..4ba0bcd6271 100644 --- a/main/valgrind/APKBUILD +++ b/main/valgrind/APKBUILD @@ -1,41 +1,36 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=valgrind -pkgver=3.18.1 -pkgrel=0 -pkgdesc="A tool to help find memory-management problems in programs" +pkgver=3.22.0 +pkgrel=1 +pkgdesc="Tool to help find memory-management problems in programs" url="https://valgrind.org/" -arch="all !mips64 !riscv64" # TODO: fix with mips64 softfloat +# armv6/riscv64 not supported upstream +arch="all !armhf !riscv64" license="GPL-2.0-or-later" # it seems like busybox sed works but the configure script requires GNU sed -makedepends="sed perl bash autoconf automake libtool" +makedepends="sed perl linux-headers" # 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" -subpackages="$pkgname-dev $pkgname-doc" +options="!strip" +subpackages="$pkgname-scripts $pkgname-dev $pkgname-doc" source="https://sourceware.org/pub/valgrind/valgrind-$pkgver.tar.bz2 - musl.supp - uclibc.patch - arm.patch - valgrind-3.13.0-malloc.patch + 0001-Bug-478624-Valgrind-incompatibility-with-binutils-2..patch " -builddir="$srcdir"/$pkgname-$pkgver -prepare() { - default_prepare - cd "$builddir" - cp "$srcdir"/musl.supp . - aclocal && autoconf && automake --add-missing - echo '#include <linux/a.out.h>' > include/a.out.h -} +# Valgrind 3.19.0 added support for compiling the tests on musl. +# However, it seems they haven't tested this on many architectures. +# Disable check on architectures where it doesn't work for now. +# +# TODO: Report upstream. +case "$CARCH" in +aarch64|s390x|armv7|x86) options="$options !check" +esac build() { - cd "$builddir" - # fails to build with ccache - export CC="gcc" - export CFLAGS="$CFLAGS -fno-stack-protector -no-pie" + export CFLAGS="${CFLAGS/-fno-plt} -fno-stack-protector -no-pie -U_FORTIFY_SOURCE" ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -49,28 +44,34 @@ build() { } check() { - cd "$builddir" make check } package() { - cd "$builddir" make DESTDIR="$pkgdir" install # we have options=!strip above so we strip the /usr/bin/* manually if [ -z "$DEBUG" ]; then - 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 + scanelf -Ry "$pkgdir" \ + | awk '$1=="ET_DYN"{printf("%s%c",$2,0)}' \ + | xargs -0 strip fi } +scripts() { + pkgdesc="$pkgdesc (perl+python cachegrind/callgrind script tools)" + depends="$pkgname=$pkgver-r$pkgrel python3 perl" + + amove \ + usr/bin/ms_print \ + usr/bin/cg_merge \ + usr/bin/cg_annotate \ + usr/bin/cg_diff \ + usr/bin/callgrind_control \ + usr/bin/callgrind_annotate +} + sha512sums=" -a03b5cd7eafab4a1cea07f46464c1546ae1cb3d106649626b1e55658badf90e58d1f3854a38a33d5dffd8237f5555ae7e1f27a4b40e06254f87825c7fc61b59b valgrind-3.18.1.tar.bz2 -49df485f158a7f4d354b2ed0d46dcc691f0490f50913c83dabfdd513b47ef1045f140fd59f54b560df05e4f3a4aba63de7124553b396189fa3ac89c908831e45 musl.supp -d59a10db9037e120df2ee94a103402ca95a79abee9d8be63e4e1bca29c82dca775cc402a79b854ec11a2160a4d2da202c237369418e221d1925267ea2613fd5d uclibc.patch -9ee297d1b2b86891584443ad0caadc4977e1447979611ccf1cc55dbee61911b0b063bc4ad936d86c451cedae410cb3219b5a088b2ad0aa17df182d564fe36cfe arm.patch -57086a768f3876b26b0e507bc159a73f0955f03d5af8cc30e21103e348ca67f2e58b5555a5a97f299751c6602692ad43d8346bb68a80917d740fb4d65bba9665 valgrind-3.13.0-malloc.patch +2904c13f68245bbafcea70998c6bd20725271300a7e94b6751ca00916943595fc3fac8557da7ea8db31b54a43f092823a0a947bc142829da811d074e1fe49777 valgrind-3.22.0.tar.bz2 +250cac58cd1710d4d9a6a24b9acc596fa01e4d2255b98b46b8ed5c7af9e658489a69b51ca7e7d17ebf5b2a9023f561391e149311c20e99607d6b7e471110cbe5 0001-Bug-478624-Valgrind-incompatibility-with-binutils-2..patch " |