summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/valgrind
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/valgrind')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-tests-amd64-Do-not-clobber-rsp-register.patch37
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.14.0.bb1
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-tests-amd64-Do-not-clobber-rsp-register.patch b/meta/recipes-devtools/valgrind/valgrind/0001-tests-amd64-Do-not-clobber-rsp-register.patch
new file mode 100644
index 0000000000..657f80335d
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-tests-amd64-Do-not-clobber-rsp-register.patch
@@ -0,0 +1,37 @@
1From 8c1ebb564f5eca2baeedc27a703200786d1abb0b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 22 Dec 2018 15:28:40 -0800
4Subject: [PATCH] tests/amd64: Do not clobber %rsp register
5
6This is seen with gcc-9.0 compiler now which is fix that gcc community
7did recently
8https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813
9
10Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=402480]
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 none/tests/amd64-linux/bug345887.c | 5 +++--
15 1 file changed, 3 insertions(+), 2 deletions(-)
16
17diff --git a/none/tests/amd64-linux/bug345887.c b/none/tests/amd64-linux/bug345887.c
18index 0f9237d..4b07fe1 100644
19--- a/none/tests/amd64-linux/bug345887.c
20+++ b/none/tests/amd64-linux/bug345887.c
21@@ -20,13 +20,14 @@ static void inner(void)
22 "movq $0x10d, %%r14\n"
23 "movq $0x10e, %%r15\n"
24 // not %rbp as mdb is then not able to reconstruct stack trace
25- "movq $0x10f, %%rsp\n"
26+ // not %rsp since gcc ignores it and since gcc >= 9.0 errors about it
27+ // see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813
28 "movq $0x1234, (%%rax)\n" // should cause SEGV here
29 "ud2" // should never get here
30 : // no output registers
31 : // no input registers
32 : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi",
33- "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", "%rsp");
34+ "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15");
35 }
36
37 __attribute__((noinline))
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb
index 50f8221ebb..bbbc3bf695 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb
@@ -36,6 +36,7 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
36 file://0001-fix-opcode-not-supported-on-mips32-linux.patch \ 36 file://0001-fix-opcode-not-supported-on-mips32-linux.patch \
37 file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \ 37 file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \
38 file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \ 38 file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \
39 file://0001-tests-amd64-Do-not-clobber-rsp-register.patch \
39 " 40 "
40SRC_URI[md5sum] = "74175426afa280184b62591b58c671b3" 41SRC_URI[md5sum] = "74175426afa280184b62591b58c671b3"
41SRC_URI[sha256sum] = "037c11bfefd477cc6e9ebe8f193bb237fe397f7ce791b4a4ce3fa1c6a520baa5" 42SRC_URI[sha256sum] = "037c11bfefd477cc6e9ebe8f193bb237fe397f7ce791b4a4ce3fa1c6a520baa5"