summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/valgrind/valgrind_3.25.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/valgrind/valgrind_3.25.0.bb')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.25.0.bb107
1 files changed, 107 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.25.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.25.0.bb
new file mode 100644
index 0000000000..67166a4ef0
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind_3.25.0.bb
@@ -0,0 +1,107 @@
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 "
29SRC_URI[sha256sum] = "295f60291d6b64c0d90c1ce645634bdc5361d39b0c50ecf9de6385ee77586ecc"
30UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar"
31
32COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64|riscv64).*-linux'
33
34# valgrind supports armv7 and above
35COMPATIBLE_HOST:armv4 = 'null'
36COMPATIBLE_HOST:armv5 = 'null'
37COMPATIBLE_HOST:armv6 = 'null'
38
39# valgrind fails with powerpc soft-float
40COMPATIBLE_HOST:powerpc = "${@bb.utils.contains('TARGET_FPU', 'soft', 'null', '.*-linux', d)}"
41
42# X32 isn't supported by valgrind at this time
43COMPATIBLE_HOST:linux-gnux32 = 'null'
44COMPATIBLE_HOST:linux-muslx32 = 'null'
45
46# Disable for some MIPS variants
47COMPATIBLE_HOST:mipsarchr6 = 'null'
48COMPATIBLE_HOST:linux-gnun32 = 'null'
49
50# Disable for powerpc64 with musl
51COMPATIBLE_HOST:libc-musl:powerpc64 = 'null'
52
53inherit autotools-brokensep multilib_header
54
55EXTRA_OECONF = "--enable-tls --without-mpicc"
56EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS') != '32']}"
57
58# valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option
59EXTRA_OECONF:append:arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}"
60
61EXTRA_OEMAKE = "-w"
62
63CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
64
65# valgrind likes to control its own optimisation flags. It generally defaults
66# to -O2 but uses -O0 for some specific test apps etc. Passing our own flags
67# (via CFLAGS) means we interfere with that. Only pass DEBUG_FLAGS to it
68# which fixes build path issue in DWARF.
69SELECTED_OPTIMIZATION = "${DEBUG_LEVELFLAG}"
70
71# Split out various helper scripts to separate packages to avoid the
72# main package depending on perl and python.
73PACKAGES =+ "${PN}-cachegrind ${PN}-massif ${PN}-callgrind"
74
75FILES:${PN}-cachegrind = "${bindir}/cg_*"
76FILES:${PN}-massif = "${bindir}/ms_*"
77FILES:${PN}-callgrind = "${bindir}/callgrind_*"
78
79RDEPENDS:${PN}-cachegrind = "${PN} python3-core"
80RDEPENDS:${PN}-massif = "${PN} perl"
81RDEPENDS:${PN}-callgrind = "${PN} perl"
82
83do_configure:prepend () {
84 rm -rf ${S}/config.h
85}
86
87do_install:append () {
88 install -m 644 ${B}/default.supp ${D}/${libexecdir}/valgrind/
89 oe_multilib_header valgrind/config.h
90}
91
92VALGRINDARCH ?= "${TARGET_ARCH}"
93VALGRINDARCH:aarch64 = "arm64"
94VALGRINDARCH:x86-64 = "amd64"
95VALGRINDARCH:x86 = "x86"
96VALGRINDARCH:mips = "mips32"
97VALGRINDARCH:mipsel = "mips32"
98VALGRINDARCH:mips64el = "mips64"
99VALGRINDARCH:powerpc = "ppc"
100VALGRINDARCH:powerpc64 = "ppc64"
101VALGRINDARCH:powerpc64le = "ppc64le"
102
103INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libexecdir}/valgrind/vgpreload_memcheck-${VALGRINDARCH}-linux.so"
104
105# valgrind needs debug information for ld.so at runtime in order to
106# redirect functions like strlen.
107RRECOMMENDS:${PN} += "${TCLIBC}-dbg"