summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-03-04 10:12:35 +0000
committerSam James <sam@gentoo.org>2024-03-04 10:13:58 +0000
commitd2ef5565cb818a3917a22949f91d48bcba3b83fe (patch)
tree48825a2655f0aec6b9bc50e2eb0a18e1c0fb149f /dev-debug/valgrind
parentdev-java/icedtea-bin: drop 3.16.0 (diff)
downloadgentoo-d2ef5565cb818a3917a22949f91d48bcba3b83fe.tar.gz
gentoo-d2ef5565cb818a3917a22949f91d48bcba3b83fe.tar.bz2
gentoo-d2ef5565cb818a3917a22949f91d48bcba3b83fe.zip
dev-debug/valgrind: drop 3.20.0-r2, 3.22.0, 3.22.0-r1
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-debug/valgrind')
-rw-r--r--dev-debug/valgrind/Manifest2
-rw-r--r--dev-debug/valgrind/files/valgrind-3.13.0-malloc.patch24
-rw-r--r--dev-debug/valgrind/files/valgrind-3.20.0-gcc-13.patch44
-rw-r--r--dev-debug/valgrind/files/valgrind-3.20.0-musl-interpose.patch30
-rw-r--r--dev-debug/valgrind/files/valgrind-3.20.0-tests-clang16.patch23
-rw-r--r--dev-debug/valgrind/valgrind-3.20.0-r2.ebuild141
-rw-r--r--dev-debug/valgrind/valgrind-3.22.0-r1.ebuild157
-rw-r--r--dev-debug/valgrind/valgrind-3.22.0.ebuild152
8 files changed, 0 insertions, 573 deletions
diff --git a/dev-debug/valgrind/Manifest b/dev-debug/valgrind/Manifest
index f4270c750aac..53d46a910f48 100644
--- a/dev-debug/valgrind/Manifest
+++ b/dev-debug/valgrind/Manifest
@@ -1,5 +1,3 @@
-DIST valgrind-3.20.0.tar.bz2 16469274 BLAKE2B 8217dcfc185c7f6601fedd8d53bb35d260b985b8049c8c73a26151db6650b1607e8e53b614652c40962ea7382b9301c4b234a933c8d81f57e649ebf3f703e630 SHA512 d6bfb9284d0410134ee7e2a5975b13c01508dd5587b562947d8197b3c113b76fdfac88c4072948be68bbf0dbeb17b4d1acb1412ce898adaa83c30ae2c6a1c12b
-DIST valgrind-3.20.0.tar.bz2.asc 488 BLAKE2B 12642e4f85c7b17bdb892221f74d80ce919554ffde3cdfa79ca27f4c5f8b48dac699084b8296b5cea285b5af660a0bc51c42b108a725be60002b14f0fda7eac7 SHA512 70dd20f15b159ffbf016c118046ee42160dd867415f1c565a92995952b1720ec36fc48557f6b523d28e6f675d62df10a4022e900fa4a104626b9e6ed6fe9ad6d
DIST valgrind-3.21.0.tar.bz2 17449484 BLAKE2B 1f7306d288eb5ecfb2b2f0b2dc68960ecd4a7213b96a2e4ecb9990a755e8c233b0e9d190c0f807019bde669f44a631c8dafe9eb521d739561e6f889f7bdaca5c SHA512 3e86cda2f2d6cd30807fac7933ba2c46a97a2b4a868db989e6b0cceeadf029af7ee34ba900466a346948289aacb30f4399799bb83b97cc49a4d2d810441e5cfd
DIST valgrind-3.21.0.tar.bz2.asc 488 BLAKE2B 6297bc925c16526a51de4f589232a8d5bcb8d54bdc885c145d329deeba45b42d3a5a8a3f59d3fb240d3bd78be7fd30d95ceb33c7624afd3c99c51833d0fd16f2 SHA512 114e5cd2f7352e56099efa3b2c42d39ed24e42419bbaac1af5e2b5c4fa72a2ba38ac6b0c60b93460a0cce8819ca0c7fae6618599b2af809ac0ab4fa30fdb25ba
DIST valgrind-3.22.0.tar.bz2 16565502 BLAKE2B 80024371b3e70521996077fba24e233097a6190477ced1b311cd41fead687dcc2511ac0ef723792488f4af08867dff3e1f474816fda09c1604b89059e31c2514 SHA512 2904c13f68245bbafcea70998c6bd20725271300a7e94b6751ca00916943595fc3fac8557da7ea8db31b54a43f092823a0a947bc142829da811d074e1fe49777
diff --git a/dev-debug/valgrind/files/valgrind-3.13.0-malloc.patch b/dev-debug/valgrind/files/valgrind-3.13.0-malloc.patch
deleted file mode 100644
index d0eb795b84be..000000000000
--- a/dev-debug/valgrind/files/valgrind-3.13.0-malloc.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/dev-debug/valgrind/files/valgrind-3.20.0-gcc-13.patch b/dev-debug/valgrind/files/valgrind-3.20.0-gcc-13.patch
deleted file mode 100644
index 3d3644f85fc1..000000000000
--- a/dev-debug/valgrind/files/valgrind-3.20.0-gcc-13.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-https://sourceware.org/git/?p=valgrind.git;a=commit;h=dee222c6e818ca43ac45952fc8a020f445d98781
-https://sourceware.org/git/?p=valgrind.git;a=commit;h=3155bacf26237beb65edb4a572402492b2f1b050
-
-From dee222c6e818ca43ac45952fc8a020f445d98781 Mon Sep 17 00:00:00 2001
-From: Paul Floyd <pjfloyd@wanadoo.fr>
-Date: Fri, 27 Jan 2023 08:30:41 +0100
-Subject: [PATCH] Bug 464859 - Build failures with GCC-13 (drd tsan_unittest)
-
-Patch submitted by
- Khem Raj <raj.khem@gmail.com>
---- a/drd/tests/tsan_thread_wrappers_pthread.h
-+++ b/drd/tests/tsan_thread_wrappers_pthread.h
-@@ -55,6 +55,7 @@
- #define NO_TLS
- #endif
-
-+#include <cstdint>
- #include <string>
- using namespace std;
-
---
-2.31.1
-
-From 3155bacf26237beb65edb4a572402492b2f1b050 Mon Sep 17 00:00:00 2001
-From: Mark Wielaard <mark@klomp.org>
-Date: Sat, 28 Jan 2023 21:53:44 +0100
-Subject: [PATCH] tsan_thread_wrappers_pthread.h: Only include cstdint for
- C++11
-
-Fixes build on older g++.
---- a/drd/tests/tsan_thread_wrappers_pthread.h
-+++ b/drd/tests/tsan_thread_wrappers_pthread.h
-@@ -55,7 +55,9 @@
- #define NO_TLS
- #endif
-
-+#if __cplusplus >= 201103L
- #include <cstdint>
-+#endif
- #include <string>
- using namespace std;
-
---
-2.31.1
diff --git a/dev-debug/valgrind/files/valgrind-3.20.0-musl-interpose.patch b/dev-debug/valgrind/files/valgrind-3.20.0-musl-interpose.patch
deleted file mode 100644
index 6ede22f8b5ec..000000000000
--- a/dev-debug/valgrind/files/valgrind-3.20.0-musl-interpose.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-https://bugs.kde.org/show_bug.cgi?id=435441
-
-From 460d0c9a6c27edfffed8ced623cecf64466619f2 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Thu, 4 Nov 2021 14:26:40 -0700
-Subject: [PATCH] Bug 435441 - Handle weak symbols as global for redirection
-
-Weak symbols are global but with lower precedence, so they should
-be handled the same way as global symbols during malloc replacement.
-
-This fixes valgrind on musl 1.2.2 when it is not patched with a
-soname (as is done on Alpine Linux).
-
-https://bugs.kde.org/show_bug.cgi?id=435441
---- a/coregrind/m_debuginfo/readelf.c
-+++ b/coregrind/m_debuginfo/readelf.c
-@@ -429,7 +429,8 @@ Bool get_elf_symbol_info (
- }
- # endif
-
-- if (ELFXX_ST_BIND(sym->st_info) == STB_GLOBAL) {
-+ if (ELFXX_ST_BIND(sym->st_info) == STB_GLOBAL
-+ || ELFXX_ST_BIND(sym->st_info) == STB_WEAK) {
- *is_global_out = True;
- }
-
---
-2.32.0
-
-
diff --git a/dev-debug/valgrind/files/valgrind-3.20.0-tests-clang16.patch b/dev-debug/valgrind/files/valgrind-3.20.0-tests-clang16.patch
deleted file mode 100644
index 01d51ba5f9ad..000000000000
--- a/dev-debug/valgrind/files/valgrind-3.20.0-tests-clang16.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-https://bugs.kde.org/show_bug.cgi?id=462007
-https://sourceware.org/git/?p=valgrind.git;a=commit;h=0811a612dd7ce0c02a5dd699b34e660c742df8fe
-
-From 0811a612dd7ce0c02a5dd699b34e660c742df8fe Mon Sep 17 00:00:00 2001
-From: Mark Wielaard <mark@klomp.org>
-Date: Fri, 18 Nov 2022 20:12:06 +0100
-Subject: [PATCH 1/1] Implicit int in none/tests/faultstatus.c
-
-There is a definition in faultstatus.c that is not accepted by
-C99 compilers (implicit ints were removed in that language revision).
-
-https://bugs.kde.org/show_bug.cgi?id=462007
---- a/none/tests/faultstatus.c
-+++ b/none/tests/faultstatus.c
-@@ -190,7 +190,7 @@ int main()
- return 0;
- }
-
--static volatile s_zero;
-+static volatile int s_zero;
-
- static int zero()
- {
diff --git a/dev-debug/valgrind/valgrind-3.20.0-r2.ebuild b/dev-debug/valgrind/valgrind-3.20.0-r2.ebuild
deleted file mode 100644
index deaf0eaa8edd..000000000000
--- a/dev-debug/valgrind/valgrind-3.20.0-r2.ebuild
+++ /dev/null
@@ -1,141 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools flag-o-matic toolchain-funcs multilib pax-utils
-
-DESCRIPTION="An open-source memory debugger for GNU/Linux"
-HOMEPAGE="https://valgrind.org"
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://sourceware.org/git/${PN}.git"
- inherit git-r3
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/valgrind.gpg
- inherit verify-sig
- SRC_URI="https://sourceware.org/pub/valgrind/${P}.tar.bz2"
- SRC_URI+=" verify-sig? ( https://sourceware.org/pub/valgrind/${P}.tar.bz2.asc )"
- KEYWORDS="-* amd64 arm arm64 ppc ppc64 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="mpi"
-
-DEPEND="mpi? ( virtual/mpi )"
-RDEPEND="${DEPEND}"
-if [[ ${PV} != 9999 ]] ; then
- BDEPEND="verify-sig? ( sec-keys/openpgp-keys-valgrind )"
-fi
-
-PATCHES=(
- # Respect CFLAGS, LDFLAGS
- "${FILESDIR}"/${PN}-3.7.0-respect-flags.patch
- "${FILESDIR}"/${PN}-3.15.0-Build-ldst_multiple-test-with-fno-pie.patch
- "${FILESDIR}"/${P}-tests-clang16.patch
- "${FILESDIR}"/${P}-gcc-13.patch
-)
-
-src_prepare() {
- # Correct hard coded doc location
- sed -i -e "s:doc/valgrind:doc/${PF}:" docs/Makefile.am || die
-
- # Don't force multiarch stuff on OSX, bug #306467
- sed -i -e 's:-arch \(i386\|x86_64\)::g' Makefile.all.am || die
-
- if use elibc_musl ; then
- PATCHES+=(
- "${FILESDIR}"/${PN}-3.13.0-malloc.patch
- "${FILESDIR}"/${PN}-3.20.0-musl-interpose.patch
- )
- fi
-
- if [[ ${CHOST} == *-solaris* ]] ; then
- # upstream doesn't support this, but we don't build with
- # Sun/Oracle ld, we have a GNU toolchain, so get some things
- # working the Linux/GNU way
- find "${S}" -name "Makefile.am" -o -name "Makefile.tool.am" | xargs \
- sed -i -e 's:-M,/usr/lib/ld/map.noexstk:-z,noexecstack:' || die
- cp "${S}"/coregrind/link_tool_exe_{linux,solaris}.in
- fi
-
- default
-
- # Regenerate autotools files
- eautoreconf
-}
-
-src_configure() {
- local myconf=()
-
- # Respect ar, bug #468114
- tc-export AR
-
- # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
- # while compiling insn_sse.c in none/tests/x86
- # -fstack-protector more undefined references to __guard and __stack_smash_handler
- # because valgrind doesn't link to glibc (bug #114347)
- # -fstack-protector-all Fails same way as -fstack-protector/-fstack-protector-strong.
- # Note: -fstack-protector-explicit is a no-op for Valgrind, no need to strip it
- # -fstack-protector-strong See -fstack-protector (bug #620402)
- # -m64 -mx32 for multilib-portage, bug #398825
- # -ggdb3 segmentation fault on startup
- # -flto* fails to build, bug #858509
- filter-flags -fomit-frame-pointer
- filter-flags -fstack-protector
- filter-flags -fstack-protector-all
- filter-flags -fstack-protector-strong
- filter-flags -m64 -mx32
- filter-flags -fsanitize -fsanitize=*
- replace-flags -ggdb3 -ggdb2
- filter-lto
-
- if use amd64 || use ppc64; then
- ! has_multilib_profile && myconf+=("--enable-only64bit")
- fi
-
- # Force bitness on darwin, bug #306467
- use x64-macos && myconf+=("--enable-only64bit")
-
- # Don't use mpicc unless the user asked for it (bug #258832)
- if ! use mpi; then
- myconf+=("--without-mpicc")
- fi
-
- econf "${myconf[@]}"
-}
-
-src_install() {
- default
-
- if [[ ${PV} == "9999" ]]; then
- # Otherwise FAQ.txt won't exist:
- emake -C docs FAQ.txt
- mv docs/FAQ.txt . || die "Couldn't move FAQ.txt"
- fi
-
- dodoc FAQ.txt
-
- pax-mark m "${ED}"/usr/$(get_libdir)/valgrind/*-*-linux
-
- # See README_PACKAGERS
- dostrip -x /usr/libexec/valgrind/vgpreload* /usr/$(get_libdir)/valgrind/*
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # fix install_names on shared libraries, can't turn them into bundles,
- # as dyld won't load them any more then, bug #306467
- local l
- for l in "${ED}"/usr/lib/valgrind/*.so ; do
- install_name_tool -id "${EPREFIX}"/usr/lib/valgrind/${l##*/} "${l}"
- done
- fi
-}
-
-pkg_postinst() {
- elog "Valgrind will not work if libc (e.g. glibc) does not have debug symbols."
- elog "To fix this you can add splitdebug to FEATURES in make.conf"
- elog "and remerge glibc. See:"
- elog "https://bugs.gentoo.org/214065"
- elog "https://bugs.gentoo.org/274771"
- elog "https://bugs.gentoo.org/388703"
-}
diff --git a/dev-debug/valgrind/valgrind-3.22.0-r1.ebuild b/dev-debug/valgrind/valgrind-3.22.0-r1.ebuild
deleted file mode 100644
index 0fb45ef9955d..000000000000
--- a/dev-debug/valgrind/valgrind-3.22.0-r1.ebuild
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# The Valgrind upstream maintainer also maintains it in Fedora and will
-# backport fixes there which haven't yet made it into a release. Keep an eye
-# on it for fixes we should cherry-pick too:
-# https://src.fedoraproject.org/rpms/valgrind/tree/rawhide
-#
-# Also check the ${PV}_STABLE branch upstream for backports.
-
-inherit autotools flag-o-matic toolchain-funcs multilib pax-utils
-
-DESCRIPTION="An open-source memory debugger for GNU/Linux"
-HOMEPAGE="https://valgrind.org"
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://sourceware.org/git/${PN}.git"
- inherit git-r3
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/valgrind.gpg
- inherit verify-sig
-
- MY_P="${P/_rc/.RC}"
- SRC_URI="https://sourceware.org/pub/valgrind/${MY_P}.tar.bz2"
- SRC_URI+=" verify-sig? ( https://sourceware.org/pub/valgrind/${MY_P}.tar.bz2.asc )"
- S="${WORKDIR}"/${MY_P}
-
- if [[ ${PV} != *_rc* ]] ; then
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
- fi
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="mpi"
-
-DEPEND="mpi? ( virtual/mpi )"
-RDEPEND="${DEPEND}"
-if [[ ${PV} != 9999 ]] ; then
- BDEPEND="verify-sig? ( sec-keys/openpgp-keys-valgrind )"
-fi
-
-PATCHES=(
- # Respect CFLAGS, LDFLAGS
- "${FILESDIR}"/${PN}-3.7.0-respect-flags.patch
- "${FILESDIR}"/${PN}-3.15.0-Build-ldst_multiple-test-with-fno-pie.patch
- "${FILESDIR}"/${PN}-3.21.0-glibc-2.34-suppressions.patch
- # From stable branch
- "${FILESDIR}"/0001-valgrind-monitor.py-regular-expressions-should-use-r.patch
- "${FILESDIR}"/0002-Bug-476548-valgrind-3.22.0-fails-on-assertion-when-l.patch
- "${FILESDIR}"/0003-Add-fchmodat2-syscall-on-linux.patch
-)
-
-src_prepare() {
- # Correct hard coded doc location
- sed -i -e "s:doc/valgrind:doc/${PF}:" docs/Makefile.am || die
-
- # Don't force multiarch stuff on OSX, bug #306467
- sed -i -e 's:-arch \(i386\|x86_64\)::g' Makefile.all.am || die
-
- if [[ ${CHOST} == *-solaris* ]] ; then
- # upstream doesn't support this, but we don't build with
- # Sun/Oracle ld, we have a GNU toolchain, so get some things
- # working the Linux/GNU way
- find "${S}" -name "Makefile.am" -o -name "Makefile.tool.am" | xargs \
- sed -i -e 's:-M,/usr/lib/ld/map.noexstk:-z,noexecstack:' || die
- cp "${S}"/coregrind/link_tool_exe_{linux,solaris}.in
- fi
-
- default
-
- eautoreconf
-}
-
-src_configure() {
- local myconf=(
- --with-gdbscripts-dir="${EPREFIX}"/usr/share/gdb/auto-load
- )
-
- # Respect ar, bug #468114
- tc-export AR
-
- # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
- # while compiling insn_sse.c in none/tests/x86
- # -fstack-protector more undefined references to __guard and __stack_smash_handler
- # because valgrind doesn't link to glibc (bug #114347)
- # -fstack-protector-all Fails same way as -fstack-protector/-fstack-protector-strong.
- # Note: -fstack-protector-explicit is a no-op for Valgrind, no need to strip it
- # -fstack-protector-strong See -fstack-protector (bug #620402)
- # -m64 -mx32 for multilib-portage, bug #398825
- # -fharden-control-flow-redundancy: breaks runtime ('jump to the invalid address stated on the next line')
- # -flto* fails to build, bug #858509
- filter-flags -fomit-frame-pointer
- filter-flags -fstack-protector
- filter-flags -fstack-protector-all
- filter-flags -fstack-protector-strong
- filter-flags -m64 -mx32
- filter-flags -fsanitize -fsanitize=*
- filter-flags -fharden-control-flow-redundancy
- append-cflags $(test-flags-CC -fno-harden-control-flow-redundancy)
- filter-lto
-
- if use amd64 || use ppc64; then
- ! has_multilib_profile && myconf+=("--enable-only64bit")
- fi
-
- # Force bitness on darwin, bug #306467
- use x64-macos && myconf+=("--enable-only64bit")
-
- # Don't use mpicc unless the user asked for it (bug #258832)
- if ! use mpi; then
- myconf+=("--without-mpicc")
- fi
-
- econf "${myconf[@]}"
-}
-
-src_test() {
- # fxsave.o, tronical.o have textrels
- emake LDFLAGS="${LDFLAGS} -Wl,-z,notext" check
-}
-
-src_install() {
- default
-
- if [[ ${PV} == "9999" ]]; then
- # Otherwise FAQ.txt won't exist:
- emake -C docs FAQ.txt
- mv docs/FAQ.txt . || die "Couldn't move FAQ.txt"
- fi
-
- dodoc FAQ.txt
-
- pax-mark m "${ED}"/usr/$(get_libdir)/valgrind/*-*-linux
-
- # See README_PACKAGERS
- dostrip -x /usr/libexec/valgrind/vgpreload* /usr/$(get_libdir)/valgrind/*
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # fix install_names on shared libraries, can't turn them into bundles,
- # as dyld won't load them any more then, bug #306467
- local l
- for l in "${ED}"/usr/lib/valgrind/*.so ; do
- install_name_tool -id "${EPREFIX}"/usr/lib/valgrind/${l##*/} "${l}"
- done
- fi
-}
-
-pkg_postinst() {
- elog "Valgrind will not work if libc (e.g. glibc) does not have debug symbols."
- elog "To fix this you can add splitdebug to FEATURES in make.conf"
- elog "and remerge glibc. See:"
- elog "https://bugs.gentoo.org/214065"
- elog "https://bugs.gentoo.org/274771"
- elog "https://bugs.gentoo.org/388703"
-}
diff --git a/dev-debug/valgrind/valgrind-3.22.0.ebuild b/dev-debug/valgrind/valgrind-3.22.0.ebuild
deleted file mode 100644
index 3d0c31f598dc..000000000000
--- a/dev-debug/valgrind/valgrind-3.22.0.ebuild
+++ /dev/null
@@ -1,152 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# The Valgrind upstream maintainer also maintains it in Fedora and will
-# backport fixes there which haven't yet made it into a release. Keep an eye
-# on it for fixes we should cherry-pick too:
-# https://src.fedoraproject.org/rpms/valgrind/tree/rawhide
-
-inherit autotools flag-o-matic toolchain-funcs multilib pax-utils
-
-DESCRIPTION="An open-source memory debugger for GNU/Linux"
-HOMEPAGE="https://valgrind.org"
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://sourceware.org/git/${PN}.git"
- inherit git-r3
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/valgrind.gpg
- inherit verify-sig
-
- MY_P="${P/_rc/.RC}"
- SRC_URI="https://sourceware.org/pub/valgrind/${MY_P}.tar.bz2"
- SRC_URI+=" verify-sig? ( https://sourceware.org/pub/valgrind/${MY_P}.tar.bz2.asc )"
- S="${WORKDIR}"/${MY_P}
-
- if [[ ${PV} != *_rc* ]] ; then
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
- fi
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="mpi"
-
-DEPEND="mpi? ( virtual/mpi )"
-RDEPEND="${DEPEND}"
-if [[ ${PV} != 9999 ]] ; then
- BDEPEND="verify-sig? ( sec-keys/openpgp-keys-valgrind )"
-fi
-
-PATCHES=(
- # Respect CFLAGS, LDFLAGS
- "${FILESDIR}"/${PN}-3.7.0-respect-flags.patch
- "${FILESDIR}"/${PN}-3.15.0-Build-ldst_multiple-test-with-fno-pie.patch
- "${FILESDIR}"/${PN}-3.21.0-glibc-2.34-suppressions.patch
-)
-
-src_prepare() {
- # Correct hard coded doc location
- sed -i -e "s:doc/valgrind:doc/${PF}:" docs/Makefile.am || die
-
- # Don't force multiarch stuff on OSX, bug #306467
- sed -i -e 's:-arch \(i386\|x86_64\)::g' Makefile.all.am || die
-
- if [[ ${CHOST} == *-solaris* ]] ; then
- # upstream doesn't support this, but we don't build with
- # Sun/Oracle ld, we have a GNU toolchain, so get some things
- # working the Linux/GNU way
- find "${S}" -name "Makefile.am" -o -name "Makefile.tool.am" | xargs \
- sed -i -e 's:-M,/usr/lib/ld/map.noexstk:-z,noexecstack:' || die
- cp "${S}"/coregrind/link_tool_exe_{linux,solaris}.in
- fi
-
- default
-
- # Regenerate autotools files
- eautoreconf
-}
-
-src_configure() {
- local myconf=(
- --with-gdbscripts-dir="${EPREFIX}"/usr/share/gdb/auto-load
- )
-
- # Respect ar, bug #468114
- tc-export AR
-
- # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
- # while compiling insn_sse.c in none/tests/x86
- # -fstack-protector more undefined references to __guard and __stack_smash_handler
- # because valgrind doesn't link to glibc (bug #114347)
- # -fstack-protector-all Fails same way as -fstack-protector/-fstack-protector-strong.
- # Note: -fstack-protector-explicit is a no-op for Valgrind, no need to strip it
- # -fstack-protector-strong See -fstack-protector (bug #620402)
- # -m64 -mx32 for multilib-portage, bug #398825
- # -fharden-control-flow-redundancy: breaks runtime ('jump to the invalid address stated on the next line')
- # -flto* fails to build, bug #858509
- filter-flags -fomit-frame-pointer
- filter-flags -fstack-protector
- filter-flags -fstack-protector-all
- filter-flags -fstack-protector-strong
- filter-flags -m64 -mx32
- filter-flags -fsanitize -fsanitize=*
- filter-flags -fharden-control-flow-redundancy
- append-cflags $(test-flags-CC -fno-harden-control-flow-redundancy)
- filter-lto
-
- if use amd64 || use ppc64; then
- ! has_multilib_profile && myconf+=("--enable-only64bit")
- fi
-
- # Force bitness on darwin, bug #306467
- use x64-macos && myconf+=("--enable-only64bit")
-
- # Don't use mpicc unless the user asked for it (bug #258832)
- if ! use mpi; then
- myconf+=("--without-mpicc")
- fi
-
- econf "${myconf[@]}"
-}
-
-src_test() {
- # fxsave.o, tronical.o have textrels
- emake LDFLAGS="${LDFLAGS} -Wl,-z,notext" check
-}
-
-src_install() {
- default
-
- if [[ ${PV} == "9999" ]]; then
- # Otherwise FAQ.txt won't exist:
- emake -C docs FAQ.txt
- mv docs/FAQ.txt . || die "Couldn't move FAQ.txt"
- fi
-
- dodoc FAQ.txt
-
- pax-mark m "${ED}"/usr/$(get_libdir)/valgrind/*-*-linux
-
- # See README_PACKAGERS
- dostrip -x /usr/libexec/valgrind/vgpreload* /usr/$(get_libdir)/valgrind/*
-
- if [[ ${CHOST} == *-darwin* ]] ; then
- # fix install_names on shared libraries, can't turn them into bundles,
- # as dyld won't load them any more then, bug #306467
- local l
- for l in "${ED}"/usr/lib/valgrind/*.so ; do
- install_name_tool -id "${EPREFIX}"/usr/lib/valgrind/${l##*/} "${l}"
- done
- fi
-}
-
-pkg_postinst() {
- elog "Valgrind will not work if libc (e.g. glibc) does not have debug symbols."
- elog "To fix this you can add splitdebug to FEATURES in make.conf"
- elog "and remerge glibc. See:"
- elog "https://bugs.gentoo.org/214065"
- elog "https://bugs.gentoo.org/274771"
- elog "https://bugs.gentoo.org/388703"
-}