1 ################################################################################
5 ################################################################################
7 VALGRIND_VERSION
= 3.12.0
8 VALGRIND_SITE
= http
://valgrind.org
/downloads
9 VALGRIND_SOURCE
= valgrind-
$(VALGRIND_VERSION
).
tar.bz2
10 VALGRIND_LICENSE
= GPLv2 GFDLv1.2
11 VALGRIND_LICENSE_FILES
= COPYING COPYING.DOCS
12 VALGRIND_CONF_OPTS
= \
15 VALGRIND_INSTALL_STAGING
= YES
17 # patch 0004-Fixes-for-musl-libc.patch touching configure.ac
18 VALGRIND_AUTORECONF
= YES
20 # When Valgrind detects a 32-bit MIPS architecture, it forcibly adds
21 # -march=mips32 to CFLAGS; when it detects a 64-bit MIPS architecture,
22 # it forcibly adds -march=mips64. This causes Valgrind to be built
23 # always for the first ISA revision level (R1), even when the user has
24 # configured Buildroot for the second ISA revision level (R2).
26 # Override the CFLAGS variable (which Valgrind appends to its CFLAGS)
27 # and pass the right -march option, so they take precedence over
28 # Valgrind's wrongfully detected value.
29 ifeq ($(BR2_mips
)$(BR2_mipsel
)$(BR2_mips64
)$(BR2_mips64el
),y
)
30 VALGRIND_CONF_ENV
+= CFLAGS
="$(TARGET_CFLAGS) -march=$(BR2_GCC_TARGET_ARCH)"
33 # On ARM, Valgrind only supports ARMv7, and uses the arch part of the
34 # host tuple to determine whether it's being built for ARMv7 or
35 # not. Therefore, we adjust the host tuple to specify we're on
36 # ARMv7. The valgrind package is guaranteed, through Config.in, to
37 # only be selected on ARMv7-A platforms.
38 ifeq ($(BR2_ARM_CPU_ARMV7A
),y
)
39 VALGRIND_CONF_OPTS
+= \
40 --host
=$(patsubst arm-
%,armv7-
%,$(GNU_TARGET_NAME
))
43 define VALGRIND_INSTALL_UCLIBC_SUPP
44 $(INSTALL
) -D
-m
0644 package
/valgrind
/uclibc.supp
$(TARGET_DIR
)/usr
/lib
/valgrind
/uclibc.supp
47 VALGRIND_POST_INSTALL_TARGET_HOOKS
+= VALGRIND_INSTALL_UCLIBC_SUPP
49 ifeq ($(BR2_PACKAGE_VALGRIND_MEMCHECK
),)
50 define VALGRIND_REMOVE_MEMCHECK
51 rm -f
$(TARGET_DIR
)/usr
/lib
/valgrind
/*memcheck
*
54 VALGRIND_POST_INSTALL_TARGET_HOOKS
+= VALGRIND_REMOVE_MEMCHECK
57 ifeq ($(BR2_PACKAGE_VALGRIND_CACHEGRIND
),)
58 define VALGRIND_REMOVE_CACHEGRIND
59 rm -f
$(TARGET_DIR
)/usr
/lib
/valgrind
/*cachegrind
*
60 for i in cg_annotate cg_diff cg_merge
; do \
61 rm -f
$(TARGET_DIR
)/usr
/bin
/$$i ; \
65 VALGRIND_POST_INSTALL_TARGET_HOOKS
+= VALGRIND_REMOVE_CACHEGRIND
68 ifeq ($(BR2_PACKAGE_VALGRIND_CALLGRIND
),)
69 define VALGRIND_REMOVE_CALLGRIND
70 rm -f
$(TARGET_DIR
)/usr
/lib
/valgrind
/*callgrind
*
71 for i in callgrind_annotate callgrind_control
; do \
72 rm -f
$(TARGET_DIR
)/usr
/bin
/$$i ; \
76 VALGRIND_POST_INSTALL_TARGET_HOOKS
+= VALGRIND_REMOVE_CALLGRIND
79 ifeq ($(BR2_PACKAGE_VALGRIND_HELGRIND
),)
80 define VALGRIND_REMOVE_HELGRIND
81 rm -f
$(TARGET_DIR
)/usr
/lib
/valgrind
/*helgrind
*
84 VALGRIND_POST_INSTALL_TARGET_HOOKS
+= VALGRIND_REMOVE_HELGRIND
87 ifeq ($(BR2_PACKAGE_VALGRIND_DRD
),)
88 define VALGRIND_REMOVE_DRD
89 rm -f
$(TARGET_DIR
)/usr
/lib
/valgrind
/*drd
*
92 VALGRIND_POST_INSTALL_TARGET_HOOKS
+= VALGRIND_REMOVE_DRD
95 ifeq ($(BR2_PACKAGE_VALGRIND_MASSIF
),)
96 define VALGRIND_REMOVE_MASSIF
97 rm -f
$(TARGET_DIR
)/usr
/lib
/valgrind
/*massif
*
98 rm -f
$(TARGET_DIR
)/usr
/bin
/ms_script
101 VALGRIND_POST_INSTALL_TARGET_HOOKS
+= VALGRIND_REMOVE_MASSIF
104 ifeq ($(BR2_PACKAGE_VALGRIND_DHAT
),)
105 define VALGRIND_REMOVE_DHAT
106 rm -f
$(TARGET_DIR
)/usr
/lib
/valgrind
/*dhat
*
109 VALGRIND_POST_INSTALL_TARGET_HOOKS
+= VALGRIND_REMOVE_DHAT
112 ifeq ($(BR2_PACKAGE_VALGRIND_SGCHECK
),)
113 define VALGRIND_REMOVE_SGCHECK
114 rm -f
$(TARGET_DIR
)/usr
/lib
/valgrind
/*sgcheck
*
117 VALGRIND_POST_INSTALL_TARGET_HOOKS
+= VALGRIND_REMOVE_SGCHECK
120 ifeq ($(BR2_PACKAGE_VALGRIND_BBV
),)
121 define VALGRIND_REMOVE_BBV
122 rm -f
$(TARGET_DIR
)/usr
/lib
/valgrind
/*bbv
*
125 VALGRIND_POST_INSTALL_TARGET_HOOKS
+= VALGRIND_REMOVE_BBV
128 ifeq ($(BR2_PACKAGE_VALGRIND_LACKEY
),)
129 define VALGRIND_REMOVE_LACKEY
130 rm -f
$(TARGET_DIR
)/usr
/lib
/valgrind
/*lackey
*
133 VALGRIND_POST_INSTALL_TARGET_HOOKS
+= VALGRIND_REMOVE_LACKEY
136 ifeq ($(BR2_PACKAGE_VALGRIND_NULGRIND
),)
137 define VALGRIND_REMOVE_NULGRIND
138 rm -f
$(TARGET_DIR
)/usr
/lib
/valgrind
/*none
*
141 VALGRIND_POST_INSTALL_TARGET_HOOKS
+= VALGRIND_REMOVE_NULGRIND
144 $(eval
$(autotools-package
))