summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/valgrind/valgrind_3.25.1.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/valgrind/valgrind_3.25.1.bb')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.25.1.bb116
1 files changed, 116 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.25.1.bb b/meta/recipes-devtools/valgrind/valgrind_3.25.1.bb
new file mode 100644
index 0000000000..a8b0be5767
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind_3.25.1.bb
@@ -0,0 +1,116 @@
1SUMMARY = "Valgrind memory debugger and instrumentation framework"
2HOMEPAGE = "http://valgrind.org/"
3DESCRIPTION = "Valgrind is an instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile your programs in detail."
4BUGTRACKER = "http://valgrind.org/support/bug_reports.html"
5LICENSE = "GPL-2.0-only & GPL-2.0-or-later & BSD-3-Clause"
6LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
7 file://include/pub_tool_basics.h;beginline=6;endline=29;md5=41c410e8d3f305aee7aaa666b2e4f366 \
8 file://include/valgrind.h;beginline=1;endline=56;md5=ad3b317f3286b6b704575d9efe6ca5df \
9 file://COPYING.DOCS;md5=24ea4c7092233849b4394699333b5c56"
10
11SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
12 file://fixed-perl-path.patch \
13 file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
14 file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \
15 file://avoid-neon-for-targets-which-don-t-support-it.patch \
16 file://0001-configure-Drop-setting-mcpu-cortex-a8-on-arm.patch \
17 file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \
18 file://0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch \
19 file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch \
20 file://0003-correct-include-directive-path-for-config.h.patch \
21 file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \
22 file://0001-memcheck-vgtests-remove-fullpath-after-flags.patch \
23 file://s390x_vec_op_t.patch \
24 file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \
25 file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \
26 file://0001-docs-Disable-manual-validation.patch \
27 file://0001-tests-arm-Use-O-instead-of-O0.patch \
28 file://0001-Use-portable-syntax-for-pushsection-directive-in-inl.patch \
29 "
30SRC_URI[sha256sum] = "61deb8d0727b45c268efdc1b3b6c9e679cd97cbf5ee4b28d1dead7c8b7a271af"
31UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar"
32
33COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64|riscv64).*-linux'
34
35# valgrind supports armv7 and above
36COMPATIBLE_HOST:armv4 = 'null'
37COMPATIBLE_HOST:armv5 = 'null'
38COMPATIBLE_HOST:armv6 = 'null'
39
40# valgrind fails with powerpc soft-float
41COMPATIBLE_HOST:powerpc = "${@bb.utils.contains('TARGET_FPU', 'soft', 'null', '.*-linux', d)}"
42
43# X32 isn't supported by valgrind at this time
44COMPATIBLE_HOST:linux-gnux32 = 'null'
45COMPATIBLE_HOST:linux-muslx32 = 'null'
46
47# Disable for some MIPS variants
48COMPATIBLE_HOST:mipsarchr6 = 'null'
49COMPATIBLE_HOST:linux-gnun32 = 'null'
50
51# Disable for powerpc64 with musl
52COMPATIBLE_HOST:libc-musl:powerpc64 = 'null'
53
54inherit autotools-brokensep multilib_header
55
56EXTRA_OECONF = "--enable-tls --without-mpicc"
57EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS') != '32']}"
58
59# valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option
60EXTRA_OECONF:append:arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}"
61
62EXTRA_OEMAKE = "-w"
63
64CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
65
66# valgrind likes to control its own optimisation flags. It generally defaults
67# to -O2 but uses -O0 for some specific test apps etc. Passing our own flags
68# (via CFLAGS) means we interfere with that. Only pass DEBUG_FLAGS to it
69# which fixes build path issue in DWARF.
70SELECTED_OPTIMIZATION = "${DEBUG_LEVELFLAG}"
71
72# Split out various helper scripts to separate packages to avoid the
73# main package depending on perl and python.
74PACKAGES =+ "${PN}-cachegrind ${PN}-massif ${PN}-callgrind"
75
76FILES:${PN}-cachegrind = "${bindir}/cg_*"
77FILES:${PN}-massif = "${bindir}/ms_*"
78FILES:${PN}-callgrind = "${bindir}/callgrind_*"
79
80RDEPENDS:${PN}-cachegrind = "${PN} python3-core"
81RDEPENDS:${PN}-massif = "${PN} perl"
82RDEPENDS:${PN}-callgrind = "${PN} perl"
83
84do_configure:prepend () {
85 rm -rf ${S}/config.h
86}
87
88do_install:append () {
89 install -m 644 ${B}/default.supp ${D}/${libexecdir}/valgrind/
90 oe_multilib_header valgrind/config.h
91}
92
93VALGRINDARCH ?= "${TARGET_ARCH}"
94VALGRINDARCH:aarch64 = "arm64"
95VALGRINDARCH:x86-64 = "amd64"
96VALGRINDARCH:x86 = "x86"
97VALGRINDARCH:mips = "mips32"
98VALGRINDARCH:mipsel = "mips32"
99VALGRINDARCH:mips64el = "mips64"
100VALGRINDARCH:powerpc = "ppc"
101VALGRINDARCH:powerpc64 = "ppc64"
102VALGRINDARCH:powerpc64le = "ppc64le"
103
104INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libexecdir}/valgrind/vgpreload_memcheck-${VALGRINDARCH}-linux.so"
105
106# valgrind needs debug information for ld.so at runtime in order to
107# redirect functions like strlen.
108RRECOMMENDS:${PN} += "${TCLIBC}-dbg"
109
110# Valgrind needs intrinsics which are not provided by clang
111# m_signals.c:2213:7: error: __builtin_longjmp is not supported for the current target
112# 2213 | VG_MINIMAL_LONGJMP(tst->sched_jmpbuf);
113# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
114#
115# It needs something like - https://bugs.kde.org/show_bug.cgi?id=369723
116TOOLCHAIN:riscv64 = "gcc"