summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-10-26 17:39:30 +0100
committerSam James <sam@gentoo.org>2023-10-26 17:47:25 +0100
commita68b29fe6de946a5fa119cd84d7987181bdfb70f (patch)
tree78c36f109a95c4f4c3254cc28a63f8e48d37b1df /dev-util/valgrind
parentsys-kernel/dracut: Stabilize 059-r4 ppc64, #916071 (diff)
downloadgentoo-a68b29fe6de946a5fa119cd84d7987181bdfb70f.tar.gz
gentoo-a68b29fe6de946a5fa119cd84d7987181bdfb70f.tar.bz2
gentoo-a68b29fe6de946a5fa119cd84d7987181bdfb70f.zip
dev-util/valgrind: add 3.22.0_rc2
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/valgrind')
-rw-r--r--dev-util/valgrind/Manifest2
-rw-r--r--dev-util/valgrind/valgrind-3.22.0_rc2.ebuild152
-rw-r--r--dev-util/valgrind/valgrind-9999.ebuild4
3 files changed, 156 insertions, 2 deletions
diff --git a/dev-util/valgrind/Manifest b/dev-util/valgrind/Manifest
index 4b0b3cae4f4a..793bcdd247b7 100644
--- a/dev-util/valgrind/Manifest
+++ b/dev-util/valgrind/Manifest
@@ -4,3 +4,5 @@ DIST valgrind-3.21.0.tar.bz2 17449484 BLAKE2B 1f7306d288eb5ecfb2b2f0b2dc68960ecd
DIST valgrind-3.21.0.tar.bz2.asc 488 BLAKE2B 6297bc925c16526a51de4f589232a8d5bcb8d54bdc885c145d329deeba45b42d3a5a8a3f59d3fb240d3bd78be7fd30d95ceb33c7624afd3c99c51833d0fd16f2 SHA512 114e5cd2f7352e56099efa3b2c42d39ed24e42419bbaac1af5e2b5c4fa72a2ba38ac6b0c60b93460a0cce8819ca0c7fae6618599b2af809ac0ab4fa30fdb25ba
DIST valgrind-3.22.0.RC1.tar.bz2 16414739 BLAKE2B 21b59e3c749c9a4fdab91568c942bd8a2c21ecadb053c88aa11563c739f8c87f403cd2a2bf03a3c6556c750a0190f2a1c4ff445355991f16d6f6a58b0be50fa1 SHA512 0aa9e98a959808d20cce53575433f81973ef3de3acc313ef2700f58cf9b2b7ee951b5bc701ef8508f5c136cb14239bbe7d81ae4208679ba55150b3edfd6078f0
DIST valgrind-3.22.0.RC1.tar.bz2.asc 488 BLAKE2B 938e032fc51e40c816fa6cec4fd95c6f183692d4d30988355bbb217984245fc7a0e6f70314f998511ab081bd2c5feeb217b025dcc84173afe7db7c04a9ebc063 SHA512 6b6518c633d40431bcf6836b0f0b67b44d7bf04a7b598dcd9707f479607a8cf9f6ca9320ddbf0d972db084c7e5bb5a02f866f5dc95c06e973d35597bf2f65695
+DIST valgrind-3.22.0.RC2.tar.bz2 17316447 BLAKE2B c0f70549d760ad599dff7d8a045e74441f42e77c7c208e19c5cec7599036dad683ef22bfd3a82f1f200a0acfbed616c33501264ff37cea773e99a31553658c03 SHA512 6a15101f4b92454856850fc35b9c38fd7fb294bee422274a803331465f347a732dc71e52c28e2d489c8d08ec7c677c1041bd32aeb4f43dd91ee404d4f6fa1208
+DIST valgrind-3.22.0.RC2.tar.bz2.asc 488 BLAKE2B 18a09f1edcaa1e26b821e30cb2cde962e3391c06bba1cac9dc72f304fd6e28d3f7586f0158b0429c792ea70ab3d9785b3e575bb1d700d4086f2a8279d35ae299 SHA512 117af5bb6758aab5a2bf2d18623254ce430399aea12c1943ee3c985ae1f0e579221144e9a0bf50ed03954f356264964c4d8f183b097739d810427bf876a212dd
diff --git a/dev-util/valgrind/valgrind-3.22.0_rc2.ebuild b/dev-util/valgrind/valgrind-3.22.0_rc2.ebuild
new file mode 100644
index 000000000000..7f177d462ac7
--- /dev/null
+++ b/dev-util/valgrind/valgrind-3.22.0_rc2.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2023 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="${BROOT}"/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
+ "${FILESDIR}"/${PN}-3.21.0-memcpy-fortify_source.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
+ 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-util/valgrind/valgrind-9999.ebuild b/dev-util/valgrind/valgrind-9999.ebuild
index 26eb51e592fd..7f177d462ac7 100644
--- a/dev-util/valgrind/valgrind-9999.ebuild
+++ b/dev-util/valgrind/valgrind-9999.ebuild
@@ -85,7 +85,7 @@ src_configure() {
# 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
+ # -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
@@ -93,7 +93,7 @@ src_configure() {
filter-flags -fstack-protector-strong
filter-flags -m64 -mx32
filter-flags -fsanitize -fsanitize=*
- replace-flags -ggdb3 -ggdb2
+ filter-flags -fharden-control-flow-redundancy
filter-lto
if use amd64 || use ppc64; then