summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/valgrind/valgrind-3.8.1
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/valgrind/valgrind-3.8.1')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind-3.8.1/Added-support-for-PPC-instructions-mfatbu-mfatbl.patch96
-rw-r--r--meta/recipes-devtools/valgrind/valgrind-3.8.1/configure-with-newer-glibc.patch41
-rw-r--r--meta/recipes-devtools/valgrind/valgrind-3.8.1/fix_issue_caused_by_ccache.patch32
-rw-r--r--meta/recipes-devtools/valgrind/valgrind-3.8.1/fix_unsupporting_kernel_3.patch26
-rw-r--r--meta/recipes-devtools/valgrind/valgrind-3.8.1/fixed-perl-path.patch53
5 files changed, 248 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind-3.8.1/Added-support-for-PPC-instructions-mfatbu-mfatbl.patch b/meta/recipes-devtools/valgrind/valgrind-3.8.1/Added-support-for-PPC-instructions-mfatbu-mfatbl.patch
new file mode 100644
index 0000000000..07774f38a9
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind-3.8.1/Added-support-for-PPC-instructions-mfatbu-mfatbl.patch
@@ -0,0 +1,96 @@
1From 0bf4b0ac18d1ea41b32ad781d214b295ca1998f3 Mon Sep 17 00:00:00 2001
2From: Aneesh Bansal <aneesh.bansal@freescale.com>
3Date: Mon, 21 Nov 2011 17:31:39 +0530
4Subject: [PATCH] Added support for PPC instructions mfatbu, mfatbl.
5
6Upstream-Status: Pending
7
8Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
9---
10Currently Valgrind 3.7.0 does not have support for PPC instructions mfatbu and mfatbl. When we run a USDPAA application with VALGRIND, the following error is given by valgrind :
11dis_proc_ctl(ppc)(mfspr,SPR)(0x20F)
12disInstr(ppc): unhandled instruction: 0x7C0F82A6
13
14
15 VEX/priv/guest_ppc_defs.h | 2 ++
16 VEX/priv/guest_ppc_helpers.c | 18 ++++++++++++++++++
17 VEX/priv/guest_ppc_toIR.c | 22 ++++++++++++++++++++++
18 3 files changed, 42 insertions(+), 0 deletions(-)
19
20diff --git a/VEX/priv/guest_ppc_defs.h b/VEX/priv/guest_ppc_defs.h
21index dd3c62e..11a34aa 100644
22--- a/VEX/priv/guest_ppc_defs.h
23+++ b/VEX/priv/guest_ppc_defs.h
24@@ -146,6 +146,8 @@ extern UInt ppc32g_dirtyhelper_MFSPR_268_269 ( UInt );
25
26 extern UInt ppc32g_dirtyhelper_MFSPR_287 ( void );
27
28+extern UInt ppc32g_dirtyhelper_MFSPR_526_527 ( UInt );
29+
30 extern void ppc32g_dirtyhelper_LVS ( VexGuestPPC32State* gst,
31 UInt vD_idx, UInt sh,
32 UInt shift_right );
33diff --git a/VEX/priv/guest_ppc_helpers.c b/VEX/priv/guest_ppc_helpers.c
34index 11aa428..b49ea3f 100644
35--- a/VEX/priv/guest_ppc_helpers.c
36+++ b/VEX/priv/guest_ppc_helpers.c
37@@ -119,6 +119,24 @@ UInt ppc32g_dirtyhelper_MFSPR_287 ( void )
38 # endif
39 }
40
41+/* CALLED FROM GENERATED CODE */
42+/* DIRTY HELPER (non-referentially transparent) */
43+UInt ppc32g_dirtyhelper_MFSPR_526_527 ( UInt r527 )
44+{
45+# if defined(__powerpc__) || defined(_AIX)
46+ UInt spr;
47+ if (r527) {
48+ __asm__ __volatile__("mfspr %0,527" : "=b"(spr));
49+ } else {
50+ __asm__ __volatile__("mfspr %0,526" : "=b"(spr));
51+ }
52+ return spr;
53+# else
54+ return 0;
55+# endif
56+}
57+
58+
59
60 /* CALLED FROM GENERATED CODE */
61 /* DIRTY HELPER (reads guest state, writes guest mem) */
62diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c
63index f8d220d..37c8974 100644
64--- a/VEX/priv/guest_ppc_toIR.c
65+++ b/VEX/priv/guest_ppc_toIR.c
66@@ -5657,6 +5657,28 @@ static Bool dis_proc_ctl ( VexAbiInfo* vbi, UInt theInstr )
67 break;
68 }
69
70+
71+ case 526 /* 0x20E */:
72+ case 527 /* 0x20F */: {
73+ UInt arg = SPR==526 ? 0 : 1;
74+ IRTemp val = newTemp(Ity_I32);
75+ IRExpr** args = mkIRExprVec_1( mkU32(arg) );
76+ IRDirty* d = unsafeIRDirty_1_N(
77+ val,
78+ 0/*regparms*/,
79+ "ppc32g_dirtyhelper_MFSPR_526_527",
80+ fnptr_to_fnentry
81+ (vbi, &ppc32g_dirtyhelper_MFSPR_526_527),
82+ args
83+ );
84+ /* execute the dirty call, dumping the result in val. */
85+ stmt( IRStmt_Dirty(d) );
86+ putIReg( rD_addr,
87+ mkWidenFrom32(ty, mkexpr(val), False/*unsigned*/) );
88+ DIP("mfspr r%u,%u", rD_addr, (UInt)SPR);
89+ break;
90+ }
91+
92 default:
93 vex_printf("dis_proc_ctl(ppc)(mfspr,SPR)(0x%x)\n", SPR);
94 return False;
95--
961.7.0.4
diff --git a/meta/recipes-devtools/valgrind/valgrind-3.8.1/configure-with-newer-glibc.patch b/meta/recipes-devtools/valgrind/valgrind-3.8.1/configure-with-newer-glibc.patch
new file mode 100644
index 0000000000..d3cea234cb
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind-3.8.1/configure-with-newer-glibc.patch
@@ -0,0 +1,41 @@
1Add case for glibc 2.16 and correct error message to denote support until 2.16
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4Signed-off-by: Saul Wold <sgw@linux.intel.com>
5Signed-off-by: Radu Moisan <radu.moisan@intel.com>
6
7Upstream-Status: Pending
8Index: valgrind-3.8.1/configure.in
9===================================================================
10--- valgrind-3.8.1.orig/configure.in
11+++ valgrind-3.8.1/configure.in
12@@ -910,6 +910,20 @@ case "${GLIBC_VERSION}" in
13 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
14 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
15 ;;
16+ 2.16)
17+ AC_MSG_RESULT(2.16 family)
18+ AC_DEFINE([GLIBC_2_16], 1, [Define to 1 if you're using glibc 2.16.x])
19+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
20+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
21+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
22+ ;;
23+ 2.17)
24+ AC_MSG_RESULT(2.17 family)
25+ AC_DEFINE([GLIBC_2_17], 1, [Define to 1 if you're using glibc 2.17.x])
26+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
27+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
28+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
29+ ;;
30 darwin)
31 AC_MSG_RESULT(Darwin)
32 AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
33@@ -923,7 +937,7 @@ case "${GLIBC_VERSION}" in
34
35 *)
36 AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
37- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.16])
38+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.17])
39 AC_MSG_ERROR([or Darwin libc])
40 ;;
41 esac
diff --git a/meta/recipes-devtools/valgrind/valgrind-3.8.1/fix_issue_caused_by_ccache.patch b/meta/recipes-devtools/valgrind/valgrind-3.8.1/fix_issue_caused_by_ccache.patch
new file mode 100644
index 0000000000..4658567b21
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind-3.8.1/fix_issue_caused_by_ccache.patch
@@ -0,0 +1,32 @@
1The script does not expect use of ccache, hence fix it to recognise it.
2
32010/08/17
4Nitin A Kamble <nitin.a.kamble@intel.com>
5
6Upstream-Status: Inappropriate [configuration]
7
8Index: valgrind-3.5.0/coregrind/link_tool_exe_linux.in
9===================================================================
10--- valgrind-3.5.0.orig/coregrind/link_tool_exe_linux.in
11+++ valgrind-3.5.0/coregrind/link_tool_exe_linux.in
12@@ -62,6 +62,11 @@ die "Bogus alt-load address"
13
14 # The cc invokation to do the final link
15 my $cc = $ARGV[1];
16+my $next = 2;
17+if ("$cc" eq "ccache") {
18+ $cc = "$cc $ARGV[2]";
19+ $next = 3;
20+}
21
22 # and the 'restargs' are argv[2 ..]
23
24@@ -71,7 +76,7 @@ my $cc = $ARGV[1];
25 my $cmd="$cc -static -Wl,-Ttext=$ala";
26
27 # Add the rest of the parameters
28-foreach my $n (2 .. $#ARGV) {
29+foreach my $n ($next .. $#ARGV) {
30 $cmd = "$cmd $ARGV[$n]";
31 }
32
diff --git a/meta/recipes-devtools/valgrind/valgrind-3.8.1/fix_unsupporting_kernel_3.patch b/meta/recipes-devtools/valgrind/valgrind-3.8.1/fix_unsupporting_kernel_3.patch
new file mode 100644
index 0000000000..346ffebb3d
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind-3.8.1/fix_unsupporting_kernel_3.patch
@@ -0,0 +1,26 @@
1valgrind: Add 3.x statements to "case" for supporting the kernel 3.x
2
3Signed-off-by: Lin Tong <tong.lin@intel.com>
4
5Upstream-Status: Pending
6
7diff --git a/configure.in b/configure.in
8index 3878619..1cb7dc7 100644
9--- a/configure.in
10+++ b/configure.in
11@@ -229,10 +229,14 @@ case "${host_os}" in
12 AC_MSG_RESULT([2.4 family (${kernel})])
13 AC_DEFINE([KERNEL_2_4], 1, [Define to 1 if you're using Linux 2.4.x])
14 ;;
15+ 3.*)
16+ AC_MSG_RESULT([3 family (${kernel})])
17+ AC_DEFINE([KERNEL_3], 1, [Define to 1 if you're using Linux 3.x])
18+ ;;
19
20 *)
21 AC_MSG_RESULT([unsupported (${kernel})])
22- AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6])
23+ AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6, 3.x])
24 ;;
25 esac
26
diff --git a/meta/recipes-devtools/valgrind/valgrind-3.8.1/fixed-perl-path.patch b/meta/recipes-devtools/valgrind/valgrind-3.8.1/fixed-perl-path.patch
new file mode 100644
index 0000000000..b054d05f7f
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind-3.8.1/fixed-perl-path.patch
@@ -0,0 +1,53 @@
1this is a temporary patch to workaround cross compilation.
2otherwise @PERL@ will be replaced to perl-native binary,
3this creates unusable scripts and fails FILERDEPENDS mechanism
4(esp. rpm)
5
6a better fix would need:
7 1. configure.ac should differentiate PERL and HOSTPERL
8 2. optionally remove ${STAGING_DIR} in #! line before do_install
9
108/31/2010 - created by Qing He <qing.he@intel.com>
11
12Upstream-Status: Inappropriate [configuration]
13
14diff --git a/cachegrind/cg_annotate.in b/cachegrind/cg_annotate.in
15index 9dc9565..cc4ef05 100644
16--- a/cachegrind/cg_annotate.in
17+++ b/cachegrind/cg_annotate.in
18@@ -1,4 +1,4 @@
19-#! @PERL@
20+#! /usr/bin/perl
21
22 ##--------------------------------------------------------------------##
23 ##--- Cachegrind's annotator. cg_annotate.in ---##
24diff --git a/cachegrind/cg_diff.in b/cachegrind/cg_diff.in
25index 951066e..84c2dde 100644
26--- a/cachegrind/cg_diff.in
27+++ b/cachegrind/cg_diff.in
28@@ -1,4 +1,4 @@
29-#! @PERL@
30+#! /usr/bin/perl
31
32 ##--------------------------------------------------------------------##
33 ##--- Cachegrind's differencer. cg_diff.in ---##
34diff --git a/massif/ms_print.in b/massif/ms_print.in
35index e6ffdbf..fb45906 100755
36--- a/massif/ms_print.in
37+++ b/massif/ms_print.in
38@@ -1,4 +1,4 @@
39-#! @PERL@
40+#! /usr/bin/perl
41
42 ##--------------------------------------------------------------------##
43 ##--- Massif's results printer ms_print.in ---##
44diff --git a/perf/vg_perf.in b/perf/vg_perf.in
45index 2188a31..83ad024 100644
46--- a/perf/vg_perf.in
47+++ b/perf/vg_perf.in
48@@ -1,4 +1,4 @@
49-#! @PERL@
50+#! /usr/bin/perl
51 ##--------------------------------------------------------------------##
52 ##--- Valgrind performance testing script vg_perf ---##
53 ##--------------------------------------------------------------------##