diff options
Diffstat (limited to 'meta/recipes-devtools/valgrind/valgrind_3.12.0.bb')
-rw-r--r-- | meta/recipes-devtools/valgrind/valgrind_3.12.0.bb | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb new file mode 100644 index 0000000000..a1138804ce --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb | |||
@@ -0,0 +1,121 @@ | |||
1 | SUMMARY = "Valgrind memory debugger and instrumentation framework" | ||
2 | HOMEPAGE = "http://valgrind.org/" | ||
3 | BUGTRACKER = "http://valgrind.org/support/bug_reports.html" | ||
4 | LICENSE = "GPLv2 & GPLv2+ & BSD" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
6 | file://include/pub_tool_basics.h;beginline=1;endline=29;md5=ebb8e640ef633f940c425686c873f9fa \ | ||
7 | file://include/valgrind.h;beginline=1;endline=56;md5=4b5e24908e53016ea561c45f4234a327 \ | ||
8 | file://COPYING.DOCS;md5=24ea4c7092233849b4394699333b5c56" | ||
9 | |||
10 | X11DEPENDS = "virtual/libx11" | ||
11 | DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)} \ | ||
12 | ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} \ | ||
13 | " | ||
14 | |||
15 | SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \ | ||
16 | file://fixed-perl-path.patch \ | ||
17 | file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \ | ||
18 | file://run-ptest \ | ||
19 | file://0002-remove-rpath.patch \ | ||
20 | file://0004-Fix-out-of-tree-builds.patch \ | ||
21 | file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \ | ||
22 | file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \ | ||
23 | file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \ | ||
24 | file://avoid-neon-for-targets-which-don-t-support-it.patch \ | ||
25 | " | ||
26 | SRC_URI_append_libc-musl = "\ | ||
27 | file://0001-fix-build-for-musl-targets.patch \ | ||
28 | " | ||
29 | SRC_URI[md5sum] = "6eb03c0c10ea917013a7622e483d61bb" | ||
30 | SRC_URI[sha256sum] = "67ca4395b2527247780f36148b084f5743a68ab0c850cb43e4a5b4b012cf76a1" | ||
31 | |||
32 | COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux' | ||
33 | |||
34 | # valgrind supports armv7 and above | ||
35 | COMPATIBLE_HOST_armv4 = 'null' | ||
36 | COMPATIBLE_HOST_armv5 = 'null' | ||
37 | COMPATIBLE_HOST_armv6 = 'null' | ||
38 | |||
39 | # valgrind doesn't like mips soft float | ||
40 | COMPATIBLE_HOST_mips = "${@bb.utils.contains("TARGET_FPU", "soft", "null", ".*-linux", d)}" | ||
41 | COMPATIBLE_HOST_mipsel = "${@bb.utils.contains("TARGET_FPU", "soft", "null", ".*-linux", d)}" | ||
42 | |||
43 | inherit autotools ptest | ||
44 | |||
45 | EXTRA_OECONF = "--enable-tls --without-mpicc" | ||
46 | EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS', True) != '32']}" | ||
47 | |||
48 | # valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option | ||
49 | EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}" | ||
50 | |||
51 | EXTRA_OEMAKE = "-w" | ||
52 | |||
53 | # valgrind likes to control its own optimisation flags. It generally defaults | ||
54 | # to -O2 but uses -O0 for some specific test apps etc. Passing our own flags | ||
55 | # (via CFLAGS) means we interfere with that. Only pass DEBUG_FLAGS to it | ||
56 | # which fixes build path issue in DWARF. | ||
57 | SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}" | ||
58 | |||
59 | CFLAGS_append_libc-uclibc = " -D__UCLIBC__ " | ||
60 | |||
61 | do_install_append () { | ||
62 | install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/ | ||
63 | } | ||
64 | |||
65 | RDEPENDS_${PN} += "perl" | ||
66 | |||
67 | # valgrind needs debug information for ld.so at runtime in order to | ||
68 | # redirect functions like strlen. | ||
69 | RRECOMMENDS_${PN} += "${TCLIBC}-dbg" | ||
70 | |||
71 | RDEPENDS_${PN}-ptest += " sed perl perl-module-file-glob" | ||
72 | RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" | ||
73 | |||
74 | # One of the tests contains a bogus interpreter path on purpose. | ||
75 | # Skip file dependency check | ||
76 | SKIP_FILEDEPS_${PN}-ptest = '1' | ||
77 | |||
78 | do_compile_ptest() { | ||
79 | oe_runmake check | ||
80 | } | ||
81 | |||
82 | do_install_ptest() { | ||
83 | chmod +x ${B}/tests/vg_regtest | ||
84 | |||
85 | # The test application binaries are not automatically installed. | ||
86 | # Grab them from the build directory. | ||
87 | # | ||
88 | # The regression tests require scripts and data files that are not | ||
89 | # copied to the build directory. They must be copied from the | ||
90 | # source directory. | ||
91 | saved_dir=$PWD | ||
92 | for parent_dir in ${S} ${B} ; do | ||
93 | cd $parent_dir | ||
94 | |||
95 | # exclude shell or the package won't install | ||
96 | rm -rf none/tests/shell* 2>/dev/null | ||
97 | |||
98 | subdirs="tests cachegrind/tests callgrind/tests drd/tests helgrind/tests massif/tests memcheck/tests none/tests" | ||
99 | |||
100 | # Get the vg test scripts, filters, and expected files | ||
101 | for dir in $subdirs ; do | ||
102 | find $dir | cpio -pvdu ${D}${PTEST_PATH} | ||
103 | done | ||
104 | cd $saved_dir | ||
105 | done | ||
106 | |||
107 | # clean out build artifacts before building the rpm | ||
108 | find ${D}${PTEST_PATH} \ | ||
109 | \( -name "Makefile*" \ | ||
110 | -o -name "*.o" \ | ||
111 | -o -name "*.c" \ | ||
112 | -o -name "*.S" \ | ||
113 | -o -name "*.h" \) \ | ||
114 | -exec rm {} \; | ||
115 | |||
116 | # needed by massif tests | ||
117 | cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print | ||
118 | |||
119 | # handle multilib | ||
120 | sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest | ||
121 | } | ||