summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-09-10 02:57:00 +0100
committerSam James <sam@gentoo.org>2022-09-10 02:57:18 +0100
commit80b1fc1e8b31f1e0b775cc2b856a64e7e058587f (patch)
tree93d290db3619c11967c49b1586072c2d44c00519 /dev-util/valgrind
parentapp-misc/screen: fix build w/ Clang 15 (fix configure tests) (diff)
downloadgentoo-80b1fc1e8b31f1e0b775cc2b856a64e7e058587f.tar.gz
gentoo-80b1fc1e8b31f1e0b775cc2b856a64e7e058587f.tar.bz2
gentoo-80b1fc1e8b31f1e0b775cc2b856a64e7e058587f.zip
dev-util/valgrind: fix build w/ Clang 15
Closes: https://bugs.gentoo.org/869320 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/valgrind')
-rw-r--r--dev-util/valgrind/files/valgrind-3.19.0-clang-15.patch33
-rw-r--r--dev-util/valgrind/valgrind-3.19.0.ebuild19
-rw-r--r--dev-util/valgrind/valgrind-9999.ebuild18
3 files changed, 52 insertions, 18 deletions
diff --git a/dev-util/valgrind/files/valgrind-3.19.0-clang-15.patch b/dev-util/valgrind/files/valgrind-3.19.0-clang-15.patch
new file mode 100644
index 000000000000..77b2e8b091a4
--- /dev/null
+++ b/dev-util/valgrind/files/valgrind-3.19.0-clang-15.patch
@@ -0,0 +1,33 @@
+https://sourceware.org/git/?p=valgrind.git;a=commit;h=1dbc46750f7f716ae3b9cf718380df77422379da
+https://bugs.gentoo.org/869320
+
+From: Paul Floyd <pjfloyd@wanadoo.fr>
+Date: Tue, 19 Apr 2022 22:03:01 +0200
+Subject: [PATCH] Bug 452779 Valgrind fails to build on FreeBSD 13.0 with
+ llvm-devel (15.0.0)
+
+This fixes building.
+
+I may make the -lgcc and libgcc-sup conditonal on not using clang later.
+--- a/Makefile.tool.am
++++ b/Makefile.tool.am
+@@ -16,14 +16,14 @@ TOOL_DEPENDENCIES_@VGCONF_PLATFORM_SEC_CAPS@ = \
+ $(top_builddir)/VEX/libvex-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
+ endif
+
+-
+-TOOL_LDADD_COMMON = -lgcc \
+- $(top_builddir)/coregrind/libgcc-sup-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
++TOOL_LDADD_COMMON = -lgcc
+ TOOL_LDADD_@VGCONF_PLATFORM_PRI_CAPS@ = \
+- $(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_PRI_CAPS@) $(TOOL_LDADD_COMMON)
++ $(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_PRI_CAPS@) $(TOOL_LDADD_COMMON) \
++ $(top_builddir)/coregrind/libgcc-sup-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
+ if VGCONF_HAVE_PLATFORM_SEC
+ TOOL_LDADD_@VGCONF_PLATFORM_SEC_CAPS@ = \
+- $(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_SEC_CAPS@) $(TOOL_LDADD_COMMON)
++ $(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_SEC_CAPS@) $(TOOL_LDADD_COMMON) \
++ $(top_builddir)/coregrind/libgcc-sup-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
+ endif
+
+
diff --git a/dev-util/valgrind/valgrind-3.19.0.ebuild b/dev-util/valgrind/valgrind-3.19.0.ebuild
index 7e7417e90831..14e4020342ba 100644
--- a/dev-util/valgrind/valgrind-3.19.0.ebuild
+++ b/dev-util/valgrind/valgrind-3.19.0.ebuild
@@ -22,6 +22,13 @@ IUSE="mpi"
DEPEND="mpi? ( virtual/mpi )"
RDEPEND="${DEPEND}"
+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.19.0-clang-15.patch
+)
+
src_prepare() {
# Correct hard coded doc location
sed -i -e "s:doc/valgrind:doc/${PF}:" docs/Makefile.am || die
@@ -29,15 +36,10 @@ src_prepare() {
# Don't force multiarch stuff on OSX, bug #306467
sed -i -e 's:-arch \(i386\|x86_64\)::g' Makefile.all.am || die
- # Respect CFLAGS, LDFLAGS
- eapply "${FILESDIR}"/${PN}-3.7.0-respect-flags.patch
-
- eapply "${FILESDIR}"/${PN}-3.15.0-Build-ldst_multiple-test-with-fno-pie.patch
-
- # conditionally copy musl specific suppressions && apply patch
+ # Conditionally copy musl specific suppressions && apply patch
if use elibc_musl ; then
cp "${FILESDIR}/musl.supp" "${S}" || die
- eapply "${FILESDIR}/valgrind-3.13.0-malloc.patch"
+ PATCHES+=( "${FILESDIR}"/valgrind-3.13.0-malloc.patch )
fi
if [[ ${CHOST} == *-solaris* ]] ; then
@@ -49,8 +51,7 @@ src_prepare() {
cp "${S}"/coregrind/link_tool_exe_{linux,solaris}.in
fi
- # Allow users to test their own patches
- eapply_user
+ default
# Regenerate autotools files
eautoreconf
diff --git a/dev-util/valgrind/valgrind-9999.ebuild b/dev-util/valgrind/valgrind-9999.ebuild
index 7e7417e90831..aed73f6be21b 100644
--- a/dev-util/valgrind/valgrind-9999.ebuild
+++ b/dev-util/valgrind/valgrind-9999.ebuild
@@ -22,6 +22,12 @@ IUSE="mpi"
DEPEND="mpi? ( virtual/mpi )"
RDEPEND="${DEPEND}"
+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
+)
+
src_prepare() {
# Correct hard coded doc location
sed -i -e "s:doc/valgrind:doc/${PF}:" docs/Makefile.am || die
@@ -29,15 +35,10 @@ src_prepare() {
# Don't force multiarch stuff on OSX, bug #306467
sed -i -e 's:-arch \(i386\|x86_64\)::g' Makefile.all.am || die
- # Respect CFLAGS, LDFLAGS
- eapply "${FILESDIR}"/${PN}-3.7.0-respect-flags.patch
-
- eapply "${FILESDIR}"/${PN}-3.15.0-Build-ldst_multiple-test-with-fno-pie.patch
-
- # conditionally copy musl specific suppressions && apply patch
+ # Conditionally copy musl specific suppressions && apply patch
if use elibc_musl ; then
cp "${FILESDIR}/musl.supp" "${S}" || die
- eapply "${FILESDIR}/valgrind-3.13.0-malloc.patch"
+ PATCHES+=( "${FILESDIR}"/valgrind-3.13.0-malloc.patch )
fi
if [[ ${CHOST} == *-solaris* ]] ; then
@@ -49,8 +50,7 @@ src_prepare() {
cp "${S}"/coregrind/link_tool_exe_{linux,solaris}.in
fi
- # Allow users to test their own patches
- eapply_user
+ default
# Regenerate autotools files
eautoreconf