diff options
Diffstat (limited to 'meta/recipes-devtools/valgrind/valgrind')
39 files changed, 1995 insertions, 676 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch b/meta/recipes-devtools/valgrind/valgrind/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch new file mode 100644 index 0000000000..81ab29f3be --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch @@ -0,0 +1,36 @@ +From 1b5b6f827ac1153a41fc93e78bf34ccdf5720b9b Mon Sep 17 00:00:00 2001 +From: Randy MacLeod <Randy.MacLeod@windriver.com> +Date: Fri, 19 Oct 2018 10:31:12 -0400 +Subject: [PATCH] Guard against __GLIBC_PREREQ for musl libc + +Upstream-Status: Submitted https://bugs.kde.org/show_bug.cgi?id=400162 + +Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> +--- + memcheck/tests/linux/sys-statx.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/memcheck/tests/linux/sys-statx.c b/memcheck/tests/linux/sys-statx.c +index fe9f9ba45..473c2cd7f 100644 +--- a/memcheck/tests/linux/sys-statx.c ++++ b/memcheck/tests/linux/sys-statx.c +@@ -7,11 +7,16 @@ + #include <assert.h> + #include <string.h> + #include <sys/syscall.h> ++ ++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) + #if __GLIBC_PREREQ(2,28) + /* struct statx provided in sys/stat.h */ + #else + #include <linux/stat.h> + #endif ++#else ++#include <linux/stat.h> ++#endif + #include <errno.h> + + int check_stat2; +-- +2.17.0 + diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-Implement-linux-rseq-syscall-as-ENOSYS.patch b/meta/recipes-devtools/valgrind/valgrind/0001-Implement-linux-rseq-syscall-as-ENOSYS.patch new file mode 100644 index 0000000000..be1536980c --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0001-Implement-linux-rseq-syscall-as-ENOSYS.patch @@ -0,0 +1,198 @@ +From 1024237358f01009fe233cb1294f3b8211304eaa Mon Sep 17 00:00:00 2001 +From: Mark Wielaard <mark@klomp.org> +Date: Fri, 10 Dec 2021 17:41:59 +0100 +Subject: [PATCH] Implement linux rseq syscall as ENOSYS + +This implements rseq for amd64, arm, arm64, ppc32, ppc64, +s390x and x86 linux as ENOSYS (without warning). + +glibc will start using rseq to accelerate sched_getcpu, if +available. This would cause a warning from valgrind every +time a new thread is started. + +Real rseq (restartable sequences) support is pretty hard, so +for now just explicitly return ENOSYS (just like we do for clone3). + +Upstream-Status: Backport [ 1024237358f01009fe233cb1294f3b8211304eaa ] + +https://sourceware.org/pipermail/libc-alpha/2021-December/133656.html +--- + coregrind/m_syswrap/syswrap-amd64-linux.c | 2 ++ + coregrind/m_syswrap/syswrap-arm-linux.c | 1 + + coregrind/m_syswrap/syswrap-arm64-linux.c | 3 ++- + coregrind/m_syswrap/syswrap-ppc32-linux.c | 2 ++ + coregrind/m_syswrap/syswrap-ppc64-linux.c | 2 ++ + coregrind/m_syswrap/syswrap-s390x-linux.c | 2 ++ + coregrind/m_syswrap/syswrap-x86-linux.c | 2 ++ + include/vki/vki-scnums-arm-linux.h | 1 + + include/vki/vki-scnums-arm64-linux.h | 4 +++- + include/vki/vki-scnums-ppc32-linux.h | 1 + + include/vki/vki-scnums-ppc64-linux.h | 1 + + include/vki/vki-scnums-s390x-linux.h | 5 ++++- + 12 files changed, 23 insertions(+), 3 deletions(-) + +diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c +index 5062324a1..18b25f80a 100644 +--- a/coregrind/m_syswrap/syswrap-amd64-linux.c ++++ b/coregrind/m_syswrap/syswrap-amd64-linux.c +@@ -862,6 +862,8 @@ static SyscallTableEntry syscall_table[] = { + + LINXY(__NR_statx, sys_statx), // 332 + ++ GENX_(__NR_rseq, sys_ni_syscall), // 334 ++ + LINX_(__NR_membarrier, sys_membarrier), // 324 + + LINX_(__NR_copy_file_range, sys_copy_file_range), // 326 +diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c +index 556dd844b..d583cef0c 100644 +--- a/coregrind/m_syswrap/syswrap-arm-linux.c ++++ b/coregrind/m_syswrap/syswrap-arm-linux.c +@@ -1024,6 +1024,7 @@ static SyscallTableEntry syscall_main_table[] = { + LINX_(__NR_pwritev2, sys_pwritev2), // 393 + + LINXY(__NR_statx, sys_statx), // 397 ++ GENX_(__NR_rseq, sys_ni_syscall), // 398 + + LINXY(__NR_clock_gettime64, sys_clock_gettime64), // 403 + LINX_(__NR_clock_settime64, sys_clock_settime64), // 404 +diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c +index b87107727..2066a38ea 100644 +--- a/coregrind/m_syswrap/syswrap-arm64-linux.c ++++ b/coregrind/m_syswrap/syswrap-arm64-linux.c +@@ -823,8 +823,9 @@ static SyscallTableEntry syscall_main_table[] = { + // (__NR_pkey_mprotect, sys_ni_syscall), // 288 + // (__NR_pkey_alloc, sys_ni_syscall), // 289 + // (__NR_pkey_free, sys_ni_syscall), // 290 ++ LINXY(__NR_statx, sys_statx), // 291 + +- LINXY(__NR_statx, sys_statx), // 397 ++ GENX_(__NR_rseq, sys_ni_syscall), // 293 + + LINXY(__NR_io_uring_setup, sys_io_uring_setup), // 425 + LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426 +diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c +index 6263ab845..637b2504e 100644 +--- a/coregrind/m_syswrap/syswrap-ppc32-linux.c ++++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c +@@ -1028,6 +1028,8 @@ static SyscallTableEntry syscall_table[] = { + + LINXY(__NR_statx, sys_statx), // 383 + ++ GENX_(__NR_rseq, sys_ni_syscall), // 387 ++ + LINXY(__NR_clock_gettime64, sys_clock_gettime64), // 403 + LINX_(__NR_clock_settime64, sys_clock_settime64), // 404 + +diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c +index a26b41c32..93956d3cc 100644 +--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c ++++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c +@@ -1019,6 +1019,8 @@ static SyscallTableEntry syscall_table[] = { + + LINXY(__NR_statx, sys_statx), // 383 + ++ GENX_(__NR_rseq, sys_ni_syscall), // 387 ++ + LINXY(__NR_io_uring_setup, sys_io_uring_setup), // 425 + LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426 + LINXY(__NR_io_uring_register, sys_io_uring_register), // 427 +diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c +index 5c9209859..73f9684c4 100644 +--- a/coregrind/m_syswrap/syswrap-s390x-linux.c ++++ b/coregrind/m_syswrap/syswrap-s390x-linux.c +@@ -860,6 +860,8 @@ static SyscallTableEntry syscall_table[] = { + + LINXY(__NR_statx, sys_statx), // 379 + ++ GENX_(__NR_rseq, sys_ni_syscall), // 381 ++ + LINXY(__NR_io_uring_setup, sys_io_uring_setup), // 425 + LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426 + LINXY(__NR_io_uring_register, sys_io_uring_register), // 427 +diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c +index 1d8f45d33..8662ff501 100644 +--- a/coregrind/m_syswrap/syswrap-x86-linux.c ++++ b/coregrind/m_syswrap/syswrap-x86-linux.c +@@ -1619,6 +1619,8 @@ static SyscallTableEntry syscall_table[] = { + /* Explicitly not supported on i386 yet. */ + GENX_(__NR_arch_prctl, sys_ni_syscall), // 384 + ++ GENX_(__NR_rseq, sys_ni_syscall), // 386 ++ + LINXY(__NR_clock_gettime64, sys_clock_gettime64), // 403 + LINX_(__NR_clock_settime64, sys_clock_settime64), // 404 + +diff --git a/include/vki/vki-scnums-arm-linux.h b/include/vki/vki-scnums-arm-linux.h +index ff560e19d..485db8b26 100644 +--- a/include/vki/vki-scnums-arm-linux.h ++++ b/include/vki/vki-scnums-arm-linux.h +@@ -432,6 +432,7 @@ + #define __NR_pkey_alloc 395 + #define __NR_pkey_free 396 + #define __NR_statx 397 ++#define __NR_rseq 398 + + + +diff --git a/include/vki/vki-scnums-arm64-linux.h b/include/vki/vki-scnums-arm64-linux.h +index 9aa3b2b5f..acdfb39c6 100644 +--- a/include/vki/vki-scnums-arm64-linux.h ++++ b/include/vki/vki-scnums-arm64-linux.h +@@ -323,9 +323,11 @@ + #define __NR_pkey_alloc 289 + #define __NR_pkey_free 290 + #define __NR_statx 291 ++#define __NR_io_pgetevents 291 ++#define __NR_rseq 293 + + #undef __NR_syscalls +-#define __NR_syscalls 292 ++#define __NR_syscalls 294 + + ///* + // * All syscalls below here should go away really, +diff --git a/include/vki/vki-scnums-ppc32-linux.h b/include/vki/vki-scnums-ppc32-linux.h +index 6987ad941..08fa77df0 100644 +--- a/include/vki/vki-scnums-ppc32-linux.h ++++ b/include/vki/vki-scnums-ppc32-linux.h +@@ -415,6 +415,7 @@ + #define __NR_pkey_alloc 384 + #define __NR_pkey_free 385 + #define __NR_pkey_mprotect 386 ++#define __NR_rseq 387 + + #endif /* __VKI_SCNUMS_PPC32_LINUX_H */ + +diff --git a/include/vki/vki-scnums-ppc64-linux.h b/include/vki/vki-scnums-ppc64-linux.h +index 6827964fd..a76fa6d32 100644 +--- a/include/vki/vki-scnums-ppc64-linux.h ++++ b/include/vki/vki-scnums-ppc64-linux.h +@@ -407,6 +407,7 @@ + #define __NR_pkey_alloc 384 + #define __NR_pkey_free 385 + #define __NR_pkey_mprotect 386 ++#define __NR_rseq 387 + + #endif /* __VKI_SCNUMS_PPC64_LINUX_H */ + +diff --git a/include/vki/vki-scnums-s390x-linux.h b/include/vki/vki-scnums-s390x-linux.h +index 6487e20c9..869c04584 100644 +--- a/include/vki/vki-scnums-s390x-linux.h ++++ b/include/vki/vki-scnums-s390x-linux.h +@@ -342,8 +342,11 @@ + #define __NR_s390_guarded_storage 378 + #define __NR_statx 379 + #define __NR_s390_sthyi 380 ++#define __NR_kexec_file_load 381 ++#define __NR_io_pgetevents 382 ++#define __NR_rseq 383 + +-#define NR_syscalls 381 ++#define NR_syscalls 384 + + /* + * There are some system calls that are not present on 64 bit, some +-- +2.30.2 + diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-Make-local-functions-static-to-avoid-assembler-error.patch b/meta/recipes-devtools/valgrind/valgrind/0001-Make-local-functions-static-to-avoid-assembler-error.patch new file mode 100644 index 0000000000..8d2ca5733e --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0001-Make-local-functions-static-to-avoid-assembler-error.patch @@ -0,0 +1,182 @@ +From 2155c1b2cf00e744e280c493eb74bf457dfcc3b1 Mon Sep 17 00:00:00 2001 +From: Randy MacLeod <Randy.MacLeod@windriver.com> +Date: Sun, 21 Oct 2018 15:09:31 -0400 +Subject: [PATCH] Make local functions static to avoid assembler error + +Avoid mips32 x-compiler warnings such as: + +| ../../../valgrind-3.14.0/helgrind/tests/annotate_hbefore.c:360:6: warning: no previous prototype for 'do_signal' [-Wmissing-prototypes] +| void do_signal ( UWord* w ) +| ^~~~~~~~~ + +by making functions and global variables that are file scope be static +and more importantly also avoid an assembler error: + +/tmp/cce22iiw.s: Assembler messages: +/tmp/cce22iiw.s:446: Error: symbol `exit_0' is already defined +/tmp/cce22iiw.s:448: Error: symbol `exit' is already defined +/tmp/cce22iiw.s:915: Error: symbol `exit_0' is already defined +/tmp/cce22iiw.s:917: Error: symbol `exit' is already defined + +Upstream-Status: Submitted https://bugs.kde.org/show_bug.cgi?id=400164 + +Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> +--- + helgrind/tests/annotate_hbefore.c | 34 +++++++++++++++---------------- + 1 file changed, 17 insertions(+), 17 deletions(-) + +diff --git a/helgrind/tests/annotate_hbefore.c b/helgrind/tests/annotate_hbefore.c +index e311714f7..f55514e45 100644 +--- a/helgrind/tests/annotate_hbefore.c ++++ b/helgrind/tests/annotate_hbefore.c +@@ -24,7 +24,7 @@ typedef unsigned long int UWord; + + // ppc64 + /* return 1 if success, 0 if failure */ +-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) ++static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) + { + UWord old, success; + +@@ -57,7 +57,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) + + // ppc32 + /* return 1 if success, 0 if failure */ +-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) ++static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) + { + UWord old, success; + +@@ -90,7 +90,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) + + // amd64 + /* return 1 if success, 0 if failure */ +-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) ++static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) + { + UWord block[4] = { (UWord)addr, expected, nyu, 2 }; + __asm__ __volatile__( +@@ -113,7 +113,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) + + // x86 + /* return 1 if success, 0 if failure */ +-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) ++static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) + { + UWord block[4] = { (UWord)addr, expected, nyu, 2 }; + __asm__ __volatile__( +@@ -138,7 +138,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) + + // arm + /* return 1 if success, 0 if failure */ +-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) ++static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) + { + UWord old, success; + UWord block[2] = { (UWord)addr, nyu }; +@@ -171,7 +171,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) + + // arm64 + /* return 1 if success, 0 if failure */ +-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) ++static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) + { + UWord old, success; + UWord block[2] = { (UWord)addr, nyu }; +@@ -204,7 +204,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) + + // s390x + /* return 1 if success, 0 if failure */ +-UWord do_acasW(UWord* addr, UWord expected, UWord nyu ) ++static UWord do_acasW(UWord* addr, UWord expected, UWord nyu ) + { + int cc; + +@@ -223,7 +223,7 @@ UWord do_acasW(UWord* addr, UWord expected, UWord nyu ) + + // mips32 + /* return 1 if success, 0 if failure */ +-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) ++static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) + { + UWord success; + UWord block[3] = { (UWord)addr, nyu, expected}; +@@ -256,7 +256,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) + + // mips64 + /* return 1 if success, 0 if failure */ +-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) ++static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) + { + UWord success; + UWord block[3] = { (UWord)addr, nyu, expected}; +@@ -287,7 +287,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu ) + + #endif + +-void atomic_incW ( UWord* w ) ++static void atomic_incW ( UWord* w ) + { + while (1) { + UWord old = *w; +@@ -301,7 +301,7 @@ void atomic_incW ( UWord* w ) + + #define NNN 1000000 + +-void* thread_fn ( void* arg ) ++static void* thread_fn ( void* arg ) + { + UWord* w = (UWord*)arg; + int i; +@@ -331,10 +331,10 @@ int main ( void ) + + #endif + +-int shared_var = 0; // is not raced upon ++static int shared_var = 0; // is not raced upon + + +-void delayXms ( int i ) ++static void delayXms ( int i ) + { + struct timespec ts = { 0, 1 * 1000 * 1000 }; + // We do the sleep in small pieces to have scheduling +@@ -348,7 +348,7 @@ void delayXms ( int i ) + } + } + +-void do_wait ( UWord* w ) ++static void do_wait ( UWord* w ) + { + UWord w0 = *w; + UWord volatile * wV = w; +@@ -357,7 +357,7 @@ void do_wait ( UWord* w ) + ANNOTATE_HAPPENS_AFTER(w); + } + +-void do_signal ( UWord* w ) ++static void do_signal ( UWord* w ) + { + ANNOTATE_HAPPENS_BEFORE(w); + atomic_incW(w); +@@ -365,7 +365,7 @@ void do_signal ( UWord* w ) + + + +-void* thread_fn1 ( void* arg ) ++static void* thread_fn1 ( void* arg ) + { + UWord* w = (UWord*)arg; + delayXms(500); // ensure t2 gets to its wait first +@@ -376,7 +376,7 @@ void* thread_fn1 ( void* arg ) + return NULL; + } + +-void* thread_fn2 ( void* arg ) ++static void* thread_fn2 ( void* arg ) + { + UWord* w = (UWord*)arg; + do_wait(w); // wait for h-b edge from first thread +-- +2.17.0 + diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-Return-a-valid-exit_code-from-vg_regtest.patch b/meta/recipes-devtools/valgrind/valgrind/0001-Return-a-valid-exit_code-from-vg_regtest.patch new file mode 100644 index 0000000000..e7af5efecc --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0001-Return-a-valid-exit_code-from-vg_regtest.patch @@ -0,0 +1,27 @@ +From 5eebdefd2251803e7d21081745018fcb16b2ba71 Mon Sep 17 00:00:00 2001 +From: Randy MacLeod <Randy.MacLeod@windriver.com> +Date: Wed, 8 May 2019 20:16:52 -0400 +Subject: [PATCH] Return a valid exit_code from vg_regtest + +Upstream-Status: Pending + +Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> +--- + tests/vg_regtest.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in +index 909af3be8..f2799c4e3 100755 +--- a/tests/vg_regtest.in ++++ b/tests/vg_regtest.in +@@ -403,6 +403,7 @@ sub mysystem($) + exit 1; + } + } ++ return $exit_code; + } + # if $keepunfiltered, copies $1 to $1.unfiltered.out + # renames $0 tp $1 +-- +2.17.0 + diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-docs-Disable-manual-validation.patch b/meta/recipes-devtools/valgrind/valgrind/0001-docs-Disable-manual-validation.patch new file mode 100644 index 0000000000..256ddb0c34 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0001-docs-Disable-manual-validation.patch @@ -0,0 +1,36 @@ +From 99fc6fe9b66becac3c94068129e84217330a71a6 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 13 Jan 2022 18:26:02 -0800 +Subject: [PATCH] docs: Disable manual validation + +validating manual and manpages, this task involves calling xmllint which +accesses network and --nonet option also does not disable this, +therefore disable it. + +Fixes +| error : Resource temporarily unavailable +| ../callgrind/docs/cl-manual.xml:4: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" +| <!ENTITY % vg-entities SYSTEM "../../docs/xml/vg-entities.xml"> %vg-entities; ] + +Upstream-Status: Inappropriate [OE-Specific] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + docs/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/Makefile.am b/docs/Makefile.am +index d4250e8..c500306 100644 +--- a/docs/Makefile.am ++++ b/docs/Makefile.am +@@ -192,7 +192,7 @@ valid-manpages: $(MANPAGES_XML_FILES) + touch $@; \ + fi + +-check-local: valid-manual valid-manpages ++check-local: + + # The text version of the FAQ. + FAQ.txt: +-- +2.34.1 + diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-fix-opcode-not-supported-on-mips32-linux.patch b/meta/recipes-devtools/valgrind/valgrind/0001-fix-opcode-not-supported-on-mips32-linux.patch new file mode 100644 index 0000000000..39b624d9f6 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0001-fix-opcode-not-supported-on-mips32-linux.patch @@ -0,0 +1,82 @@ +From fb5362f205b37c5060fcd764a7ed393abe4f2f3d Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Fri, 27 Jul 2018 17:39:37 +0800 +Subject: [PATCH 1/2] fix opcode not supported on mips32-linux + +While build tests(`make check') on mips32-linux, there are +serial failures such as: +[snip] +| mips-wrsmllib32-linux-gcc -meb -mabi=32 -mhard-float -c +-o atomic_incs-atomic_incs.o `test -f 'atomic_incs.c' || echo +'../../../valgrind-3.13.0/memcheck/tests/'`atomic_incs.c +| /tmp/ccqrmINN.s: Assembler messages: +| /tmp/ccqrmINN.s:247: Error: opcode not supported on this +processor: mips1 (mips1) `ll $t3,0($t1)' +| /tmp/ccqrmINN.s:249: Error: opcode not supported on this +processor: mips1 (mips1) `sc $t3,0($t1)' +[snip] + +Since the following commit applied, it defines CLFAGS for mips32, +but missed to pass them to tests which caused the above failure +... +3e344c57f Merge in a port for mips32-linux +... + +Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=396905] +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + helgrind/tests/Makefile.am | 5 +++++ + memcheck/tests/Makefile.am | 5 +++++ + none/tests/mips32/Makefile.am | 4 ++++ + 3 files changed, 14 insertions(+) + +diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am +index ad1af191a..6209d35a7 100644 +--- a/helgrind/tests/Makefile.am ++++ b/helgrind/tests/Makefile.am +@@ -214,6 +214,11 @@ check_PROGRAMS += annotate_rwlock + endif + + AM_CFLAGS += $(AM_FLAG_M3264_PRI) ++ ++if VGCONF_PLATFORMS_INCLUDE_MIPS32_LINUX ++AM_CFLAGS += $(AM_CFLAGS_MIPS32_LINUX) ++endif ++ + AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) + + LDADD = -lpthread +diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am +index 84e49405f..aff861a32 100644 +--- a/memcheck/tests/Makefile.am ++++ b/memcheck/tests/Makefile.am +@@ -443,6 +443,11 @@ check_PROGRAMS += reach_thread_register + endif + + AM_CFLAGS += $(AM_FLAG_M3264_PRI) ++ ++if VGCONF_PLATFORMS_INCLUDE_MIPS32_LINUX ++AM_CFLAGS += $(AM_CFLAGS_MIPS32_LINUX) ++endif ++ + AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) + + if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX +diff --git a/none/tests/mips32/Makefile.am b/none/tests/mips32/Makefile.am +index d11591d45..602cd26f6 100644 +--- a/none/tests/mips32/Makefile.am ++++ b/none/tests/mips32/Makefile.am +@@ -99,6 +99,10 @@ check_PROGRAMS = \ + round_fpu64 \ + fpu_branches + ++if VGCONF_PLATFORMS_INCLUDE_MIPS32_LINUX ++AM_CFLAGS += $(AM_CFLAGS_MIPS32_LINUX) ++endif ++ + AM_CFLAGS += @FLAG_M32@ + AM_CXXFLAGS += @FLAG_M32@ + AM_CCASFLAGS += @FLAG_M32@ +-- +2.17.1 + diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch b/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch new file mode 100644 index 0000000000..9f1da7bac6 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch @@ -0,0 +1,108 @@ +From 715cf122388f3527afa5649cebf9f1522c240693 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 20 Apr 2017 10:11:16 -0700 +Subject: [PATCH] makefiles: Drop setting -mcpu to cortex-a8 on arm + architecture + +We can not assume that all arches armv7+ are cortex-a8 only +it fails to build for rpi which is armv7ve based (cortex-a8) cpu +implementation. +Fixes +| cc1: warning: switch -mcpu=cortex-a8 conflicts with -march=armv7ve switch + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile.all.am | 6 +++--- + helgrind/tests/Makefile.am | 6 +++--- + none/tests/arm/Makefile.am | 18 +++++++++--------- + 3 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/Makefile.all.am b/Makefile.all.am +index 02059a3..c7c4700 100644 +--- a/Makefile.all.am ++++ b/Makefile.all.am +@@ -197,11 +197,11 @@ AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g + + AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ + AM_CFLAGS_ARM_LINUX = @FLAG_M32@ \ +- $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 ++ $(AM_CFLAGS_BASE) -marm + AM_CFLAGS_PSO_ARM_LINUX = @FLAG_M32@ $(AM_CFLAGS_BASE) \ +- -marm -mcpu=cortex-a8 $(AM_CFLAGS_PSO_BASE) ++ -marm $(AM_CFLAGS_PSO_BASE) + AM_CCASFLAGS_ARM_LINUX = @FLAG_M32@ \ +- -marm -mcpu=cortex-a8 -g ++ -marm -g + + AM_FLAG_M3264_ARM64_LINUX = @FLAG_M64@ + AM_CFLAGS_ARM64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) +diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am +index df82169..07eb66a 100644 +--- a/helgrind/tests/Makefile.am ++++ b/helgrind/tests/Makefile.am +@@ -189,9 +189,9 @@ if ! VGCONF_PLATFORMS_INCLUDE_X86_DARWIN + endif + + if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX +-annotate_hbefore_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8 +-tc07_hbl1_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8 +-tc08_hbl2_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8 ++annotate_hbefore_CFLAGS = $(AM_CFLAGS) ++tc07_hbl1_CFLAGS = $(AM_CFLAGS) ++tc08_hbl2_CFLAGS = $(AM_CFLAGS) + else + annotate_hbefore_CFLAGS = $(AM_CFLAGS) + tc07_hbl1_CFLAGS = $(AM_CFLAGS) +diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am +index 024eb6d..ccecb90 100644 +--- a/none/tests/arm/Makefile.am ++++ b/none/tests/arm/Makefile.am +@@ -52,10 +52,10 @@ allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@ + # need special helping w.r.t -mfpu and -mfloat-abi, though. + # Also force -O0 since -O takes hundreds of MB of memory + # for v6intThumb.c. +-v6intARM_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -marm +-v6intThumb_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb ++v6intARM_CFLAGS = $(AM_CFLAGS) -g -O0 -marm ++v6intThumb_CFLAGS = $(AM_CFLAGS) -g -O0 -mthumb + +-v6media_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb ++v6media_CFLAGS = $(AM_CFLAGS) -g -O0 -mthumb + + v8crypto_a_CFLAGS = $(AM_CFLAGS) -g -O0 -mfpu=crypto-neon-fp-armv8 -marm + v8crypto_t_CFLAGS = $(AM_CFLAGS) -g -O0 -mfpu=crypto-neon-fp-armv8 -mthumb +@@ -65,23 +65,23 @@ v8memory_a_CFLAGS = $(AM_CFLAGS) -g -O0 \ + v8memory_t_CFLAGS = $(AM_CFLAGS) -g -O0 \ + -march=armv8-a -mfpu=crypto-neon-fp-armv8 -mthumb + +-vfp_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \ ++vfp_CFLAGS = $(AM_CFLAGS) -g -O0 \ + -mfpu=neon \ + -mthumb + + +-neon128_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \ ++neon128_CFLAGS = $(AM_CFLAGS) -g -O0 \ + -mfpu=neon \ + -mthumb + +-neon64_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \ ++neon64_CFLAGS = $(AM_CFLAGS) -g -O0 \ + -mfpu=neon \ + -mthumb + + intdiv_CFLAGS = $(AM_CFLAGS) -g -march=armv7ve -mcpu=cortex-a15 -mthumb +-ldrt_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb +-ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm ++ldrt_CFLAGS = $(AM_CFLAGS) -g -mthumb ++ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -marm + +-vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mfpu=vfpv3 ++vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mfpu=vfpv3 + + vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -march=armv7ve -mcpu=cortex-a15 -mfpu=vfpv4 -marm +-- +2.12.2 + diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch b/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch new file mode 100644 index 0000000000..a48d7db070 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch @@ -0,0 +1,32 @@ +From 3409dc35c15bb14c8a525239806322648e079ab1 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 5 Jul 2017 17:12:43 -0700 +Subject: [PATCH 1/3] memcheck/arm64: Define __THROW if not already defined + +Helps compiling with musl where __THROW is not available + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Submitted + + memcheck/tests/arm64-linux/scalar.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/memcheck/tests/arm64-linux/scalar.h b/memcheck/tests/arm64-linux/scalar.h +index 9008816..8ef050f 100644 +--- a/memcheck/tests/arm64-linux/scalar.h ++++ b/memcheck/tests/arm64-linux/scalar.h +@@ -12,6 +12,10 @@ + #include <sys/types.h> + #include <sys/mman.h> + ++#ifndef __THROW ++#define __THROW ++#endif ++ + // Since we use vki_unistd.h, we can't include <unistd.h>. So we have to + // declare this ourselves. + extern long int syscall (long int __sysno, ...) __THROW; +-- +2.13.2 + diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Fix-timerfd-syscall-test.patch b/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Fix-timerfd-syscall-test.patch new file mode 100644 index 0000000000..15fbbe954f --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Fix-timerfd-syscall-test.patch @@ -0,0 +1,98 @@ +From 5d411fd147d652e9d7bb259f4048693c6e4742aa Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 9 Mar 2020 16:30:19 -0700 +Subject: [PATCH] memcheck/tests: Fix timerfd syscall test + +modern libc provides these functions, moreover this also ensures that we +are 64bit time_t safe. Fallback to existing definitions if libc does not +have the implementation or syscall is not defined + +Upstream-Status: Submitted [https://sourceforge.net/p/valgrind/mailman/message/36943897/] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + config.h.in | 9 +++++++++ + configure.ac | 3 +++ + memcheck/tests/linux/timerfd-syscall.c | 10 ++++++++-- + 5 files changed, 32 insertions(+), 2 deletions(-) + +--- a/config.h.in ++++ b/config.h.in +@@ -301,6 +301,9 @@ + /* Define to 1 if you have the <sys/sysnvl.h> header file. */ + #undef HAVE_SYS_SYSNVL_H + ++/* Define to 1 if you have the <sys/timerfd.h> header file. */ ++#undef HAVE_SYS_TIMERFD_H ++ + /* Define to 1 if you have the <sys/time.h> header file. */ + #undef HAVE_SYS_TIME_H + +--- a/configure.ac ++++ b/configure.ac +@@ -4098,6 +4098,7 @@ AC_CHECK_HEADERS([ \ + sys/syscall.h \ + sys/sysnvl.h \ + sys/time.h \ ++ sys/timerfd.h \ + sys/types.h \ + ]) + +--- a/memcheck/tests/linux/timerfd-syscall.c ++++ b/memcheck/tests/linux/timerfd-syscall.c +@@ -45,6 +45,9 @@ + #if defined(HAVE_SYS_TIME_H) + #include <sys/time.h> + #endif ++#if defined(HAVE_SYS_TIMERFD_H) ++#include <sys/timerfd.h> ++#endif + #if defined(HAVE_SYS_TYPES_H) + #include <sys/types.h> + #endif +@@ -54,7 +57,8 @@ + * timerfd_* system call numbers introduced in 2.6.23. These constants are + * not yet in the glibc 2.7 headers, that is why they are defined here. + */ +-#ifndef __NR_timerfd_create ++#if !defined(HAVE_SYS_TIMERFD_H) ++#if !defined(__NR_timerfd_create) + #if defined(__x86_64__) + #define __NR_timerfd_create 283 + #elif defined(__i386__) +@@ -67,8 +71,10 @@ + #error Cannot detect your architecture! + #endif + #endif ++#endif + +-#ifndef __NR_timerfd_settime ++#if !defined(HAVE_SYS_TIMERFD_H) ++#if !defined(__NR_timerfd_settime) + #if defined(__x86_64__) + #define __NR_timerfd_settime 286 + #define __NR_timerfd_gettime 287 +@@ -85,7 +91,7 @@ + #error Cannot detect your architecture! + #endif + #endif +- ++#endif + + + /* Definitions from include/linux/timerfd.h */ +@@ -127,6 +133,7 @@ void set_timespec(struct timespec *tmr, + tmr->tv_nsec = (long) (1000ULL * (ustime % 1000000ULL)); + } + ++#if !defined(HAVE_SYS_TIMERFD_H) + int timerfd_create(int clockid, int flags) + { + return syscall(__NR_timerfd_create, clockid, flags); +@@ -142,6 +149,7 @@ int timerfd_gettime(int ufc, struct itim + { + return syscall(__NR_timerfd_gettime, ufc, otmr); + } ++#endif + + long waittmr(int tfd, int timeo) + { diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-vgtests-remove-fullpath-after-flags.patch b/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-vgtests-remove-fullpath-after-flags.patch new file mode 100644 index 0000000000..dce8b52ba3 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-vgtests-remove-fullpath-after-flags.patch @@ -0,0 +1,42 @@ +From 3ff82dcb844f98dbf67c69f11f6516bc234725a9 Mon Sep 17 00:00:00 2001 +From: Stacy Gaikovaia <Stacy.Gaikovaia@windriver.com> +Date: Wed, 16 Sep 2020 13:45:07 -0400 +Subject: [PATCH] memcheck vgtests remove fullpath-after flags + +Test executables produced when cross-compiling can contain +relative paths containing version number, such as: + coregrind/tests/../../../valgrind-3.16.1/coregrind + +Remove the --fullpath-after option so yocto project doesn't +have to upgrade patch every valgrind uprev. Upgrade test stderr +paths in corresponding tests .bb script. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Stacy Gaikovaia <Stacy.Gaikovaia@windriver.com> +--- + memcheck/tests/badfree3.vgtest | 2 +- + memcheck/tests/varinfo5.vgtest | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/memcheck/tests/badfree3.vgtest b/memcheck/tests/badfree3.vgtest +index 3dfc5fd8a..4ee03f00a 100644 +--- a/memcheck/tests/badfree3.vgtest ++++ b/memcheck/tests/badfree3.vgtest +@@ -1,3 +1,3 @@ + prog: badfree +-vgopts: -q --fullpath-after=memcheck/ --fullpath-after=coregrind/ ++vgopts: -q + stderr_filter_args: badfree.c +diff --git a/memcheck/tests/varinfo5.vgtest b/memcheck/tests/varinfo5.vgtest +index 063d00dce..79c4a72a4 100644 +--- a/memcheck/tests/varinfo5.vgtest ++++ b/memcheck/tests/varinfo5.vgtest +@@ -1,3 +1,3 @@ + prog: varinfo5 +-vgopts: --fullpath-after=memcheck/ --fullpath-after=coregrind/ --read-var-info=yes --read-inline-info=yes -q ++vgopts: --read-var-info=yes --read-inline-info=yes -q + stderr_filter: filter_varinfo3 +-- +2.25.1 + diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch b/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch new file mode 100644 index 0000000000..e421ac6c80 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch @@ -0,0 +1,34 @@ +From f405297d3382cd98391d02f397e2387da1f42879 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Fri, 24 Jan 2020 17:55:39 +0100 +Subject: [PATCH] none/tests/fdleak_cmsg.stderr.exp: adjust /tmp paths + +In oe-core, /tmp is linked to /var/volatile/tmp and +valgrind output changes accordingly + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + none/tests/fdleak_cmsg.stderr.exp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/none/tests/fdleak_cmsg.stderr.exp b/none/tests/fdleak_cmsg.stderr.exp +index 6e5a797b9..0ede1ab18 100644 +--- a/none/tests/fdleak_cmsg.stderr.exp ++++ b/none/tests/fdleak_cmsg.stderr.exp +@@ -25,10 +25,10 @@ Open file descriptor ...: /dev/null + + + FILE DESCRIPTORS: 6 open (3 std) at exit. +-Open file descriptor ...: /tmp/data2 ++Open file descriptor ...: ... + ... + +-Open file descriptor ...: /tmp/data1 ++Open file descriptor ...: ... + ... + + Open AF_UNIX socket ...: <unknown> +-- +2.17.1 + diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch b/meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch new file mode 100644 index 0000000000..27366153f7 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch @@ -0,0 +1,31 @@ +From 64ad2744acfb4fa40b1c114633a053f87125a203 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 10 Jun 2017 00:46:39 -0700 +Subject: [PATCH 1/6] sigqueue: Rename _sifields to __si_fields on musl + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + memcheck/tests/linux/sigqueue.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/memcheck/tests/linux/sigqueue.c b/memcheck/tests/linux/sigqueue.c +index d18bd72..acb7cba 100644 +--- a/memcheck/tests/linux/sigqueue.c ++++ b/memcheck/tests/linux/sigqueue.c +@@ -8,6 +8,11 @@ + #include <syscall.h> + #include <unistd.h> + ++/* musl libc defines siginfo_t __si_fields instead of _sifields */ ++#if defined(__linux__) && !defined(__GLIBC__) ++#define _sifields __si_fields ++#endif ++ + int main(int argc, char **argv) + { + siginfo_t *si; +-- +2.13.1 + diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch b/meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch new file mode 100644 index 0000000000..8f771ed0bd --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch @@ -0,0 +1,35 @@ +From 568224da7e647d00abf14a7160997689d9745c89 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 10 Jun 2017 00:39:07 -0700 +Subject: [PATCH] str_tester.c: Limit rawmemchr() test to glibc + +rawmemchr() is a GNU extention therefore mark it so + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending +--- + memcheck/tests/str_tester.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/memcheck/tests/str_tester.c b/memcheck/tests/str_tester.c +index 7c2ff1e..8b82ced 100644 +--- a/memcheck/tests/str_tester.c ++++ b/memcheck/tests/str_tester.c +@@ -504,7 +504,7 @@ test_strchrnul (void) + #endif + + // DDD: better done by testing for the function. +-#if !defined(__APPLE__) && !defined(__sun) && !defined(__FreeBSD__) ++#if !defined(__APPLE__) && !defined(__sun) && !defined(__FreeBSD__) && defined(__GLIBC__) + static void + test_rawmemchr (void) + { +@@ -1451,7 +1451,7 @@ main (void) + test_strchrnul (); + # endif + +-# if !defined(__APPLE__) && !defined(__sun) && !defined(__FreeBSD__) ++# if !defined(__APPLE__) && !defined(__sun) && !defined(__FreeBSD__) && defined(__GLIBC__) + /* rawmemchr. */ + test_rawmemchr (); + # endif diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-Enable-rt_sigpending-syscall-on-ppc64-linux.patch b/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-Enable-rt_sigpending-syscall-on-ppc64-linux.patch deleted file mode 100644 index 56bb5f55fe..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-Enable-rt_sigpending-syscall-on-ppc64-linux.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 1a8006f56342dae9f7100a3c33d80873676e0404 Mon Sep 17 00:00:00 2001 -From: Li Zhou <li.zhou@windriver.com> -Date: Mon, 24 Aug 2015 03:55:18 -0400 -Subject: [PATCH] valgrind: Enable rt_sigpending syscall on ppc64 linux - -New Revision: 15133 -Enable rt_sigpending syscall on ppc64 linux. -Patch from Thomas Huth <thuth@redhat.com> - -Get the patch from valgrind upstream: -http://valgrind.10908.n7.nabble.com/Valgrind-r15133-in-trunk-NEWS-coregrind-m-syswrap-syswrap-ppc64-linux-c-td54589.html - -Upstream-Status: backport - -Signed-off-by: Li Zhou <li.zhou@windriver.com> ---- - coregrind/m_syswrap/syswrap-ppc64-linux.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c -index 5946ee1..8aaa1d7 100644 ---- a/coregrind/m_syswrap/syswrap-ppc64-linux.c -+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c -@@ -887,7 +887,7 @@ static SyscallTableEntry syscall_table[] = { - LINXY(__NR_rt_sigaction, sys_rt_sigaction), // 173 - LINXY(__NR_rt_sigprocmask, sys_rt_sigprocmask), // 174 - --// _____(__NR_rt_sigpending, sys_rt_sigpending), // 175 -+ LINXY(__NR_rt_sigpending, sys_rt_sigpending), // 175 - LINXY(__NR_rt_sigtimedwait, sys_rt_sigtimedwait), // 176 - LINXY(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo), // 177 - LINX_(__NR_rt_sigsuspend, sys_rt_sigsuspend), // 178 --- -1.9.1 - diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch b/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch new file mode 100644 index 0000000000..bf0f0ded21 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch @@ -0,0 +1,39 @@ +From d1dea3c2bcf1e22baab39e2c0b8ca59db8a5bc37 Mon Sep 17 00:00:00 2001 +From: Randy MacLeod <Randy.MacLeod@windriver.com> +Date: Mon, 13 May 2019 17:12:21 -0400 +Subject: [PATCH 1/2] valgrind: filter_xml_frames: do not filter /usr + +filter_xml_frames is intended to filter system paths under +'/usr' that vary from platform to platform. In the ptest case +for Yocto's valgrind, the ptest executables are placed under: + /usr/lib/valgrind/ptest +and if these frames are filtered out, then the 'drd' tests fail +the comparision between exepected and actual output. + +Changing this filter allows the comparison to succeed without +any negative impact. + +Upstream-Status: Inappropriate [Yocto specific] + +Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> +--- + tests/filter_xml_frames | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/tests/filter_xml_frames b/tests/filter_xml_frames +index f1fa3f070..04fbc82de 100755 +--- a/tests/filter_xml_frames ++++ b/tests/filter_xml_frames +@@ -47,7 +47,8 @@ while (my $line = <>) + $has_function_name = 1 if ($line =~ /<fn>/); + # This may require tweaking; currently /lib and /usr/lib are matched + $has_system_obj = 1 if ($line =~ /<obj>\/lib/); +- $has_system_obj = 1 if ($line =~ /<obj>\/usr\/lib/); ++# for Yocto, skip /usr since tests are under /usr/lib/... ++# $has_system_obj = 1 if ($line =~ /<obj>\/usr\/lib/); + } + } + +-- +2.17.0 + diff --git a/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch b/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch new file mode 100644 index 0000000000..7f0e38cb95 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch @@ -0,0 +1,92 @@ +From 26c104adf6c5162572b7aa2fac89d0835b7f8f0b Mon Sep 17 00:00:00 2001 +From: Randy MacLeod <Randy.MacLeod@windriver.com> +Date: Tue, 16 Oct 2018 21:27:46 -0400 +Subject: [PATCH] context APIs are not available on musl + +Updated patch for valgrind-3.14 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> + +Apply same patch to drd/tests/swapcontext.c +for valgrind-3.17. + +Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=434775] + +Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> +--- + drd/tests/swapcontext.c | 6 ++++++ + memcheck/tests/linux/stack_changes.c | 7 ++++++- + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/drd/tests/swapcontext.c b/drd/tests/swapcontext.c +index 622c70bc5..5e72bb0f3 100644 +--- a/drd/tests/swapcontext.c ++++ b/drd/tests/swapcontext.c +@@ -20,6 +20,7 @@ + + #define STACKSIZE (PTHREAD_STACK_MIN + 4096) + ++#ifdef __GLIBC__ + typedef struct thread_local { + ucontext_t uc[3]; + size_t nrsw; +@@ -67,9 +68,11 @@ void *worker(void *data) + swapcontext(&tlocal->uc[0], &tlocal->uc[1]); + return NULL; + } ++#endif + + int main(int argc, char *argv[]) + { ++#ifdef __GLIBC__ + enum { NR = 32 }; + thread_local_t tlocal[NR]; + pthread_t thread[NR]; +@@ -94,6 +97,9 @@ int main(int argc, char *argv[]) + + for (i = 0; i < NR; i++) + pthread_join(thread[i], NULL); ++#else ++ printf("libc context call APIs e.g. getcontext() are deprecated by posix\n"); ++#endif + + return 0; + } +diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c +index 7f97b90a5..a26cb4ae6 100644 +--- a/memcheck/tests/linux/stack_changes.c ++++ b/memcheck/tests/linux/stack_changes.c +@@ -10,6 +10,7 @@ + // This test is checking the libc context calls (setcontext, etc.) and + // checks that Valgrind notices their stack changes properly. + ++#ifdef __GLIBC__ + typedef ucontext_t mycontext; + + mycontext ctx1, ctx2, oldc; +@@ -51,9 +52,11 @@ int init_context(mycontext *uc) + + return ret; + } ++#endif + + int main(int argc, char **argv) + { ++#ifdef __GLIBC__ + int c1 = init_context(&ctx1); + int c2 = init_context(&ctx2); + +@@ -66,6 +69,8 @@ int main(int argc, char **argv) + //free(ctx1.uc_stack.ss_sp); + VALGRIND_STACK_DEREGISTER(c2); + //free(ctx2.uc_stack.ss_sp); +- ++#else ++ printf("libc context call APIs e.g. getcontext() are deprecated by posix\n"); ++#endif + return 0; + } +-- +2.17.1 + diff --git a/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch b/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch new file mode 100644 index 0000000000..5433472291 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch @@ -0,0 +1,32 @@ +From 67d199dbdcbb3feff5f8928f87725fc64c0307d7 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 5 Jul 2017 17:36:42 -0700 +Subject: [PATCH 2/3] memcheck/x86: Define __THROW if not defined + +musl does not have __THROW, therefore make it null + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Submitted + + memcheck/tests/x86-linux/scalar.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/memcheck/tests/x86-linux/scalar.h b/memcheck/tests/x86-linux/scalar.h +index ef28b03..52f742e 100644 +--- a/memcheck/tests/x86-linux/scalar.h ++++ b/memcheck/tests/x86-linux/scalar.h +@@ -11,6 +11,10 @@ + #include <sys/types.h> + #include <sys/mman.h> + ++#ifndef __THROW ++#define __THROW ++#endif ++ + // Since we use vki_unistd.h, we can't include <unistd.h>. So we have to + // declare this ourselves. + extern long int syscall (long int __sysno, ...) __THROW; +-- +2.13.2 + diff --git a/meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch b/meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch new file mode 100644 index 0000000000..c2965c40df --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch @@ -0,0 +1,45 @@ +From ecbdea7bd8b08205f1bc3f6b72d4b4a80f313fcb Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 10 Jun 2017 01:03:17 -0700 +Subject: [PATCH 3/6] correct include directive path for config.h + +when building out of source tree, it can not find +the generated config.h otherwise + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + memcheck/tests/linux/syscalls-2007.c | 2 +- + memcheck/tests/linux/syslog-syscall.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/memcheck/tests/linux/syscalls-2007.c b/memcheck/tests/linux/syscalls-2007.c +index b61c6d5..cc3fd62 100644 +--- a/memcheck/tests/linux/syscalls-2007.c ++++ b/memcheck/tests/linux/syscalls-2007.c +@@ -10,7 +10,7 @@ + + #define _GNU_SOURCE + +-#include "../../config.h" ++#include "config.h" + #include <fcntl.h> + #include <signal.h> + #include <stdint.h> +diff --git a/memcheck/tests/linux/syslog-syscall.c b/memcheck/tests/linux/syslog-syscall.c +index 1143722..21e758b 100644 +--- a/memcheck/tests/linux/syslog-syscall.c ++++ b/memcheck/tests/linux/syslog-syscall.c +@@ -6,7 +6,7 @@ + * klogctl(). + */ + +-#include "../../config.h" ++#include "config.h" + #include <stdio.h> + #if defined(HAVE_SYS_KLOG_H) + #include <sys/klog.h> +-- +2.13.1 + diff --git a/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch b/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch new file mode 100644 index 0000000000..fa1344c853 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch @@ -0,0 +1,68 @@ +From d103475875858ab8a2e6b53ce178bb2f63883d4c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 5 Jul 2017 17:37:56 -0700 +Subject: [PATCH 3/3] tests/seg_override: Replace __modify_ldt() with syscall() + +__modify_ldt() is specific to glibc, replacing it with syscall() +makes it more portable. + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Submitted + + none/tests/x86-linux/seg_override.c | 15 ++++++--------- + 1 file changed, 6 insertions(+), 9 deletions(-) + +diff --git a/none/tests/x86-linux/seg_override.c b/none/tests/x86-linux/seg_override.c +index b7619c9..c89874b 100644 +--- a/none/tests/x86-linux/seg_override.c ++++ b/none/tests/x86-linux/seg_override.c +@@ -2,6 +2,8 @@ + #include <stdio.h> + #include <errno.h> + #include <string.h> ++#include <unistd.h> ++#include <syscall.h> + + /* Stuff from Wine. */ + +@@ -52,14 +54,11 @@ inline static unsigned int wine_ldt_get_limit( const LDT_ENTRY *ent ) + /* our copy of the ldt */ + LDT_ENTRY ldt_copy[8192]; + +-/* System call to set LDT entry. */ +-//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t); +-extern int __modify_ldt (int, void *, size_t); +- + void print_ldt ( void ) + { + int res; +- res = __modify_ldt( 0, ldt_copy, 8192*sizeof(LDT_ENTRY) ); ++ /* System call to set LDT entry. */ ++ res = syscall(SYS_modify_ldt, 0, ldt_copy, 8192*sizeof(LDT_ENTRY) ); + printf("got %d bytes\n", res ); + perror("error is"); + } +@@ -83,9 +82,6 @@ struct modify_ldt_ldt_s + unsigned int empty:25; + }; + +-/* System call to set LDT entry. */ +-//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t); +- + void set_ldt1 ( void* base ) + { + int stat; +@@ -102,7 +98,8 @@ void set_ldt1 ( void* base ) + ldt_entry.read_exec_only = 0; + ldt_entry.limit_in_pages = 0; + ldt_entry.seg_not_present = 0; +- stat = __modify_ldt (1, &ldt_entry, sizeof (ldt_entry)); ++ /* System call to set LDT entry. */ ++ stat = syscall(SYS_modify_ldt, 1, &ldt_entry, sizeof (ldt_entry)); + printf("stat = %d\n", stat); + } + +-- +2.13.2 + diff --git a/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch b/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch new file mode 100644 index 0000000000..9a25b67961 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch @@ -0,0 +1,176 @@ +From 59e3190e9121c5439d54298b083b44c5c3794a7f Mon Sep 17 00:00:00 2001 +From: Randy MacLeod <Randy.MacLeod@windriver.com> +Date: Tue, 16 Oct 2018 21:01:04 -0400 +Subject: [PATCH] Fix out of tree builds. + +The paths to these files need to be fully specified in +the out of tree build case. glibc-2.X.supp is a generated file so the +full path +is deliberately not specified in that case. + +RP 2013/03/23 + +Patch refreshed for valgrind-3.14.0. + +Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=445211] + +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> + +--- + configure.ac | 62 ++++++++++++++++++++++++++-------------------------- + 1 file changed, 31 insertions(+), 31 deletions(-) + +diff --git a/configure.ac b/configure.ac +index b851798..d360896 100755 +--- a/configure.ac ++++ b/configure.ac +@@ -447,50 +447,50 @@ case "${host_os}" in + 9.*) + AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard]) + AC_DEFINE([DARWIN_VERS], DARWIN_10_5, [Darwin / Mac OS X version]) +- DEFAULT_SUPP="darwin9.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="darwin9-drd.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin9-drd.supp ${DEFAULT_SUPP}" + ;; + 10.*) + AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard]) + AC_DEFINE([DARWIN_VERS], DARWIN_10_6, [Darwin / Mac OS X version]) +- DEFAULT_SUPP="darwin10.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin10.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" + ;; + 11.*) + AC_MSG_RESULT([Darwin 11.x (${kernel}) / Mac OS X 10.7 Lion]) + AC_DEFINE([DARWIN_VERS], DARWIN_10_7, [Darwin / Mac OS X version]) +- DEFAULT_SUPP="darwin11.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin11.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" + ;; + 12.*) + AC_MSG_RESULT([Darwin 12.x (${kernel}) / Mac OS X 10.8 Mountain Lion]) + AC_DEFINE([DARWIN_VERS], DARWIN_10_8, [Darwin / Mac OS X version]) +- DEFAULT_SUPP="darwin12.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin12.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" + ;; + 13.*) + AC_MSG_RESULT([Darwin 13.x (${kernel}) / Mac OS X 10.9 Mavericks]) + AC_DEFINE([DARWIN_VERS], DARWIN_10_9, [Darwin / Mac OS X version]) +- DEFAULT_SUPP="darwin13.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin13.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" + ;; + 14.*) + AC_MSG_RESULT([Darwin 14.x (${kernel}) / Mac OS X 10.10 Yosemite]) + AC_DEFINE([DARWIN_VERS], DARWIN_10_10, [Darwin / Mac OS X version]) +- DEFAULT_SUPP="darwin14.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin14.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" + ;; + 15.*) + AC_MSG_RESULT([Darwin 15.x (${kernel}) / Mac OS X 10.11 El Capitan]) + AC_DEFINE([DARWIN_VERS], DARWIN_10_11, [Darwin / Mac OS X version]) +- DEFAULT_SUPP="darwin15.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin15.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" + ;; + 16.*) + AC_MSG_RESULT([Darwin 16.x (${kernel}) / macOS 10.12 Sierra]) + AC_DEFINE([DARWIN_VERS], DARWIN_10_12, [Darwin / Mac OS X version]) +- DEFAULT_SUPP="darwin16.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin16.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" + ;; + 17.*) + AC_MSG_RESULT([Darwin 17.x (${kernel}) / macOS 10.13 High Sierra]) +@@ -515,7 +515,7 @@ case "${host_os}" in + DEFAULT_SUPP="solaris12.supp ${DEFAULT_SUPP}" + ;; + *) +- DEFAULT_SUPP="solaris11.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/solaris11.supp ${DEFAULT_SUPP}" + ;; + esac + ;; +@@ -523,7 +523,7 @@ case "${host_os}" in + solaris2.12*) + AC_MSG_RESULT([ok (${host_os})]) + VGCONF_OS="solaris" +- DEFAULT_SUPP="solaris12.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/solaris12.supp ${DEFAULT_SUPP}" + ;; + + *) +@@ -1237,15 +1237,15 @@ AC_MSG_CHECKING([the glibc version]) + case "${GLIBC_VERSION}" in + 2.2) + AC_MSG_RESULT(${GLIBC_VERSION} family) +- DEFAULT_SUPP="glibc-2.2.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/glibc-2.2.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" + ;; + 2.[[3-6]]) + AC_MSG_RESULT(${GLIBC_VERSION} family) +- DEFAULT_SUPP="glibc-${GLIBC_VERSION}.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/glibc-${GLIBC_VERSION}.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/glibc-2.X-helgrind.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" + ;; + 2.[[7-9]]) + AC_MSG_RESULT(${GLIBC_VERSION} family) +@@ -1258,8 +1258,8 @@ case "${GLIBC_VERSION}" in + AC_DEFINE([GLIBC_MANDATORY_STRLEN_REDIRECT], 1, + [Define to 1 if strlen() has been optimized heavily (amd64 glibc >= 2.10)]) + DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/glibc-2.X-helgrind.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" + ;; + 2.*) + AC_MSG_RESULT(${GLIBC_VERSION} family) +@@ -1268,8 +1268,8 @@ case "${GLIBC_VERSION}" in + AC_DEFINE([GLIBC_MANDATORY_INDEX_AND_STRLEN_REDIRECT], 1, + [Define to 1 if index() and strlen() have been optimized heavily (x86 glibc >= 2.12)]) + DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/glibc-2.X-helgrind.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" + ;; + darwin) + AC_MSG_RESULT(Darwin) +@@ -1284,7 +1284,7 @@ case "${GLIBC_VERSION}" in + bionic) + AC_MSG_RESULT(Bionic) + AC_DEFINE([BIONIC_LIBC], 1, [Define to 1 if you're using Bionic]) +- DEFAULT_SUPP="bionic.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/bionic.supp ${DEFAULT_SUPP}" + ;; + solaris) + AC_MSG_RESULT(Solaris) +@@ -1313,8 +1313,8 @@ if test "$VGCONF_OS" != "solaris"; then + # attempt to detect whether such libraries are installed on the + # build machine (or even if any X facilities are present); just + # add the suppressions antidisirregardless. +- DEFAULT_SUPP="xfree-4.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="xfree-3.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/xfree-4.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="$srcdir/xfree-3.supp ${DEFAULT_SUPP}" + fi + + diff --git a/meta/recipes-devtools/valgrind/valgrind/add-ptest.patch b/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch index 225f84305f..a3637ea846 100644 --- a/meta/recipes-devtools/valgrind/valgrind/add-ptest.patch +++ b/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch @@ -1,4 +1,7 @@ -Modify vg_test wrapper to support PTEST formats +From f49f27f1bc67d07440b0ac9a7d767a8ea1589bfe Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Tue, 15 Dec 2015 15:50:44 +0200 +Subject: [PATCH 5/5] Modify vg_test wrapper to support PTEST formats Change the valgrind regression test script vg_regtest to support the yocto ptest stdout reporting format. The commit adds @@ -11,60 +14,64 @@ option, --yocto-ptest, the valgrind regression test output is unchanged. Enforce 30 seconds limit for the test. This resume execution of the remaining tests when valgrind hangs. -Upstream-Status: Pending +Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Tudor Florea <tudor.florea@enea.com> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> + +Increase time limit to 90 s. +(double of the expected time of drd/tests/std_list on qemuarm64) + +Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> +--- + tests/vg_regtest.in | 75 +++++++++++++++++++++++++++++++++++++++-------------- + 1 file changed, 55 insertions(+), 20 deletions(-) diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in -index 224385f..3e0383b 100755 +index a441f42..cb05b52 100755 --- a/tests/vg_regtest.in +++ b/tests/vg_regtest.in -@@ -39,11 +39,11 @@ - # --valgrind.) - # --keep-unfiltered: keep a copy of the unfiltered output/error output - # of each test by adding an extension .unfiltered.out --# - # --outer-valgrind: run this valgrind under the given outer valgrind. - # This valgrind must be configured with --enable-inner. - # --outer-tool: tool to use by the outer valgrind (default memcheck). - # --outer-args: use this as outer tool args. +@@ -47,6 +47,7 @@ + # --loop-till-fail: loops on the test(s) till one fail, then exit + # This is useful to obtain detailed trace or --keep-unfiltered + # output of a non deterministic test failure +# --yocto-ptest: output in yocto ptest format # # The easiest way is to run all tests in valgrind/ with (assuming you installed # in $PREFIX): -@@ -126,7 +126,7 @@ use strict; - my $usage="\n" +@@ -139,7 +140,7 @@ my $usage="\n" . "Usage:\n" . " vg_regtest [--all, --valgrind, --valgrind-lib, --keep-unfiltered\n" -- . " --outer-valgrind, --outer-tool, --outer-args]\n" -+ . " --outer-valgrind, --outer-tool, --outer-args, --yocto-ptest]\n" + . " --outer-valgrind, --outer-tool, --outer-args\n" +- . " --loop-till-fail]\n" ++ . " --loop-till-fail, --yocto-ptest]\n" . " Use EXTRA_REGTEST_OPTS to supply extra args for all tests\n" . "\n"; -@@ -170,6 +170,7 @@ my $outer_args; - +@@ -186,6 +187,7 @@ my $outer_args; my $valgrind_lib = "$tests_dir/.in_place"; my $keepunfiltered = 0; + my $looptillfail = 0; +my $yoctoptest = 0; # default filter is the one named "filter_stderr" in the test's directory my $default_stderr_filter = "filter_stderr"; -@@ -226,6 +227,8 @@ sub process_command_line() - $valgrind_lib = $1; - } elsif ($arg =~ /^--keep-unfiltered$/) { +@@ -244,6 +246,8 @@ sub process_command_line() $keepunfiltered = 1; + } elsif ($arg =~ /^--loop-till-fail$/) { + $looptillfail = 1; + } elsif ($arg =~ /^--yocto-ptest$/) { + $yoctoptest = 1; } else { die $usage; } -@@ -340,13 +343,28 @@ sub read_vgtest_file($) +@@ -365,13 +369,28 @@ sub read_vgtest_file($) #---------------------------------------------------------------------------- # Since most of the program time is spent in system() calls, need this to # propagate a Ctrl-C enabling us to quit. -sub mysystem($) -+# Enforce 30 seconds limit for the test. ++# Enforce 90 seconds limit for the test. +# This resume execution of the remaining tests if valgrind hangs. +sub mysystem($) { @@ -74,7 +81,7 @@ index 224385f..3e0383b 100755 + my $exit_code=0; + eval { + local $SIG{'ALRM'} = sub { die "timed out\n" }; -+ alarm(30); ++ alarm(90); + $exit_code = system($_[0]); + alarm (0); + ($exit_code == 2) and die "SIGINT\n"; # 2 is SIGINT @@ -93,7 +100,7 @@ index 224385f..3e0383b 100755 # if $keepunfiltered, copies $1 to $1.unfiltered.out # renames $0 tp $1 sub filtered_rename($$) -@@ -394,19 +412,21 @@ sub do_diffs($$$$) +@@ -419,23 +438,25 @@ sub do_diffs($$$$) # A match; remove .out and any previously created .diff files. unlink("$name.$mid.out"); unlink(<$name.$mid.diff*>); @@ -107,6 +114,10 @@ index 224385f..3e0383b 100755 + print "*** $name failed ($mid) ***\n" if ($yoctoptest == 0) ; push(@failures, sprintf("%-40s ($mid)", "$fullname")); $num_failures{$mid}++; + if ($looptillfail == 1) { + print "Failure encountered, stopping to loop\n"; + exit 1 + } + return 1; } @@ -117,7 +128,7 @@ index 224385f..3e0383b 100755 $vgtest =~ /^(.*)\.vgtest/; my $name = $1; my $fullname = "$dir/$name"; -@@ -425,7 +445,11 @@ sub do_one_test($$) +@@ -454,7 +475,11 @@ sub do_one_test($$) } elsif (256 == $prereq_res) { # Nb: weird Perl-ism -- exit code of '1' is seen by Perl as 256... # Prereq failed, skip. @@ -130,8 +141,8 @@ index 224385f..3e0383b 100755 return; } else { # Bad prereq; abort. -@@ -438,7 +462,7 @@ sub do_one_test($$) - if (defined $progB) { +@@ -472,7 +497,7 @@ sub do_one_test($$) + } # If there is a progB, let's start it in background: printf("%-16s valgrind $extraopts $vgopts $prog $args (progB: $progB $argsB)\n", - "$name:"); @@ -139,7 +150,7 @@ index 224385f..3e0383b 100755 # progB.done used to detect child has finished. See below. # Note: redirection of stdout and stderr is before $progB to allow argsB # to e.g. redirect stdoutB to stderrB -@@ -452,7 +476,8 @@ sub do_one_test($$) +@@ -488,7 +513,8 @@ sub do_one_test($$) . "touch progB.done) &"); } } else { @@ -147,9 +158,9 @@ index 224385f..3e0383b 100755 + printf("%-16s valgrind $extraopts $vgopts $prog $args\n", "$name:") + if ($yoctoptest == 0); } - - # Pass the appropriate --tool option for the directory (can be overridden -@@ -487,7 +512,7 @@ sub do_one_test($$) + + # Collect environment variables, if any. +@@ -529,7 +555,7 @@ sub do_one_test($$) # Find all the .stdout.exp files. If none, use /dev/null. my @stdout_exps = <$name.stdout.exp*>; @stdout_exps = ( "/dev/null" ) if (0 == scalar @stdout_exps); @@ -158,7 +169,7 @@ index 224385f..3e0383b 100755 # Filter stderr $stderr_filter_args = $name if (! defined $stderr_filter_args); -@@ -496,7 +521,7 @@ sub do_one_test($$) +@@ -538,7 +564,7 @@ sub do_one_test($$) # Find all the .stderr.exp files. At least one must exist. my @stderr_exps = <$name.stderr.exp*>; (0 != scalar @stderr_exps) or die "Could not find `$name.stderr.exp*'\n"; @@ -167,7 +178,7 @@ index 224385f..3e0383b 100755 if (defined $progB) { # wait for the child to be finished -@@ -520,7 +545,7 @@ sub do_one_test($$) +@@ -562,7 +588,7 @@ sub do_one_test($$) # Find all the .stdoutB.exp files. If none, use /dev/null. my @stdoutB_exps = <$name.stdoutB.exp*>; @stdoutB_exps = ( "/dev/null" ) if (0 == scalar @stdoutB_exps); @@ -176,7 +187,7 @@ index 224385f..3e0383b 100755 # Filter stderr $stderrB_filter_args = $name if (! defined $stderrB_filter_args); -@@ -529,7 +554,7 @@ sub do_one_test($$) +@@ -571,7 +597,7 @@ sub do_one_test($$) # Find all the .stderrB.exp files. At least one must exist. my @stderrB_exps = <$name.stderrB.exp*>; (0 != scalar @stderrB_exps) or die "Could not find `$name.stderrB.exp*'\n"; @@ -185,7 +196,7 @@ index 224385f..3e0383b 100755 } # Maybe do post-test check -@@ -541,7 +566,7 @@ sub do_one_test($$) +@@ -583,7 +609,7 @@ sub do_one_test($$) # Find all the .post.exp files. If none, use /dev/null. my @post_exps = <$name.post.exp*>; @post_exps = ( "/dev/null" ) if (0 == scalar @post_exps); @@ -194,7 +205,7 @@ index 224385f..3e0383b 100755 } } -@@ -550,6 +575,13 @@ sub do_one_test($$) +@@ -592,6 +618,13 @@ sub do_one_test($$) print("(cleanup operation failed: $cleanup)\n"); } @@ -208,7 +219,7 @@ index 224385f..3e0383b 100755 $num_tests_done++; } -@@ -589,7 +621,7 @@ sub test_one_dir($$) +@@ -631,7 +664,7 @@ sub test_one_dir($$) my $found_tests = (0 != (grep { $_ =~ /\.vgtest$/ } @fs)); if ($found_tests) { @@ -217,7 +228,7 @@ index 224385f..3e0383b 100755 } foreach my $f (@fs) { if (-d $f) { -@@ -599,7 +631,7 @@ sub test_one_dir($$) +@@ -641,7 +674,7 @@ sub test_one_dir($$) } } if ($found_tests) { @@ -226,7 +237,7 @@ index 224385f..3e0383b 100755 } chdir(".."); -@@ -625,10 +657,12 @@ sub summarise_results +@@ -667,10 +700,12 @@ sub summarise_results $num_failures{"stdout"}, plural($num_failures{"stdout"}), $num_failures{"stderrB"}, plural($num_failures{"stderrB"}), $num_failures{"stdoutB"}, plural($num_failures{"stdoutB"}), @@ -241,3 +252,6 @@ index 224385f..3e0383b 100755 } print "\n"; } +-- +2.6.2 + diff --git a/meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch b/meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch new file mode 100644 index 0000000000..02241781d9 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch @@ -0,0 +1,28 @@ +From ace5fe19b3f13039d5d6bd5d99d54c20ea79e09c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 10 Jun 2017 01:07:59 -0700 +Subject: [PATCH] tc20_verifywrap.c: Fake __GLIBC_PREREQ with musl + +similar to sun + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + helgrind/tests/tc20_verifywrap.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/helgrind/tests/tc20_verifywrap.c b/helgrind/tests/tc20_verifywrap.c +index ae97bde..db2eb70 100644 +--- a/helgrind/tests/tc20_verifywrap.c ++++ b/helgrind/tests/tc20_verifywrap.c +@@ -20,7 +20,7 @@ + + #if !defined(__APPLE__) && !defined(__FreeBSD__) + +-#if defined(__sun__) ++#if defined(__sun__) || (defined(__linux__) && !defined(__GLIBC__)) + /* Fake __GLIBC_PREREQ on Solaris. Pretend glibc >= 2.4. */ + # define __GLIBC_PREREQ + #else diff --git a/meta/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch b/meta/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch new file mode 100644 index 0000000000..5fcfec0015 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch @@ -0,0 +1,33 @@ +From 8facc29c3c56e6cf9cfef70986cf73876044a3fb Mon Sep 17 00:00:00 2001 +From: Andre McCurdy <armccurdy@gmail.com> +Date: Tue, 19 Jan 2016 16:42:36 -0800 +Subject: [PATCH] avoid neon for targets which don't support it + +The sh-mem-random.c test app tries to use neon loads and stores to +test 64-bit float copies when building for ARM. Allow it to do so if +possible, but fallback to C when building for ARM targets which don't +support neon. + +Upstream-Status: Pending + +Signed-off-by: Andre McCurdy <armccurdy@gmail.com> +--- + memcheck/tests/sh-mem-random.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/memcheck/tests/sh-mem-random.c b/memcheck/tests/sh-mem-random.c +index ae82248..816e139 100644 +--- a/memcheck/tests/sh-mem-random.c ++++ b/memcheck/tests/sh-mem-random.c +@@ -191,7 +191,7 @@ void do_test_at ( U1* arr ) + "emms" + : : "r"(arr+dst), "r"(arr+src) : "memory" + ); +-#elif defined(__linux__) && defined(__arm__) && !defined(__aarch64__) ++#elif defined(__linux__) && defined(__arm__) && defined(__ARM_NEON__) && !defined(__aarch64__) + /* On arm32, many compilers generate a 64-bit float move + using two 32 bit integer registers, which completely + defeats this test. Hence force a 64-bit NEON load and +-- +1.9.1 + diff --git a/meta/recipes-devtools/valgrind/valgrind/enable.building.on.4.x.kernel.patch b/meta/recipes-devtools/valgrind/valgrind/enable.building.on.4.x.kernel.patch deleted file mode 100644 index 300f2f19fa..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/enable.building.on.4.x.kernel.patch +++ /dev/null @@ -1,37 +0,0 @@ -Enable building valgrind on host with 4.x kernel. - -For OpenEmbedded builds we should be checking something like -OLDEST_KERNEL instead of `uname -r`, but this is good enough for now. - -Building on 4.x* currently fails with: - configure:5556: checking for the kernel version - configure:5579: result: unsupported (4.0.0-rc3-00111-gaffb817) - configure:5581: error: Valgrind works on kernels 2.4, 2.6 - -Upstream-Status: Pending -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> - ---- valgrind-3.9.0/configure.ac.orig 2015-03-13 19:17:01.247310868 +0100 -+++ valgrind-3.9.0/configure.ac 2015-03-13 19:19:27.388316108 +0100 -@@ -276,9 +276,9 @@ - kernel=`uname -r` - - case "${kernel}" in -- 2.6.*|3.*) -- AC_MSG_RESULT([2.6.x/3.x family (${kernel})]) -- AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x or Linux 3.x]) -+ 2.6.*|3.*|4.*) -+ AC_MSG_RESULT([2.6.x/3.x/4.x family (${kernel})]) -+ AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x or Linux 3.x or Linux 4.x]) - ;; - - 2.4.*) -@@ -288,7 +288,7 @@ - - *) - AC_MSG_RESULT([unsupported (${kernel})]) -- AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6]) -+ AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6, 3.x, 4.x]) - ;; - esac - diff --git a/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch b/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch index b054d05f7f..db6867f625 100644 --- a/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch +++ b/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch @@ -1,3 +1,8 @@ +From d85cc45e0ddeda68adf594dead715964cb32d0e7 Mon Sep 17 00:00:00 2001 +From: Qing He <qing.he@intel.com> +Date: Tue, 31 Aug 2010 22:51:58 +0800 +Subject: [PATCH] valgrind: fix perl scripts + this is a temporary patch to workaround cross compilation. otherwise @PERL@ will be replaced to perl-native binary, this creates unusable scripts and fails FILERDEPENDS mechanism @@ -11,8 +16,17 @@ a better fix would need: Upstream-Status: Inappropriate [configuration] +Signed-off-by: Maxin B. John <maxin.john@intel.com> +--- + cachegrind/cg_annotate.in | 2 +- + cachegrind/cg_diff.in | 2 +- + massif/ms_print.in | 2 +- + perf/vg_perf.in | 2 +- + tests/vg_regtest.in | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + diff --git a/cachegrind/cg_annotate.in b/cachegrind/cg_annotate.in -index 9dc9565..cc4ef05 100644 +index fea114b..5e814fd 100644 --- a/cachegrind/cg_annotate.in +++ b/cachegrind/cg_annotate.in @@ -1,4 +1,4 @@ @@ -22,7 +36,7 @@ index 9dc9565..cc4ef05 100644 ##--------------------------------------------------------------------## ##--- Cachegrind's annotator. cg_annotate.in ---## diff --git a/cachegrind/cg_diff.in b/cachegrind/cg_diff.in -index 951066e..84c2dde 100644 +index 9d9258e..d0f0ec7 100755 --- a/cachegrind/cg_diff.in +++ b/cachegrind/cg_diff.in @@ -1,4 +1,4 @@ @@ -32,7 +46,7 @@ index 951066e..84c2dde 100644 ##--------------------------------------------------------------------## ##--- Cachegrind's differencer. cg_diff.in ---## diff --git a/massif/ms_print.in b/massif/ms_print.in -index e6ffdbf..fb45906 100755 +index a206ce4..df1bc31 100755 --- a/massif/ms_print.in +++ b/massif/ms_print.in @@ -1,4 +1,4 @@ @@ -42,7 +56,7 @@ index e6ffdbf..fb45906 100755 ##--------------------------------------------------------------------## ##--- Massif's results printer ms_print.in ---## diff --git a/perf/vg_perf.in b/perf/vg_perf.in -index 2188a31..83ad024 100644 +index 90ee1d2..c585096 100644 --- a/perf/vg_perf.in +++ b/perf/vg_perf.in @@ -1,4 +1,4 @@ @@ -51,3 +65,16 @@ index 2188a31..83ad024 100644 ##--------------------------------------------------------------------## ##--- Valgrind performance testing script vg_perf ---## ##--------------------------------------------------------------------## +diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in +index 0fe6341..1b45eb7 100755 +--- a/tests/vg_regtest.in ++++ b/tests/vg_regtest.in +@@ -1,4 +1,4 @@ +-#! @PERL@ ++#! /usr/bin/perl + ##--------------------------------------------------------------------## + ##--- Valgrind regression testing script vg_regtest ---## + ##--------------------------------------------------------------------## +-- +2.29.2 + diff --git a/meta/recipes-devtools/valgrind/valgrind/force-nostabs.patch b/meta/recipes-devtools/valgrind/valgrind/force-nostabs.patch deleted file mode 100644 index 849dfc50f9..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/force-nostabs.patch +++ /dev/null @@ -1,42 +0,0 @@ -Suppress building ptest apps with the -gstabs option - -Force the configure tests for -gstabs compiler support to fail so that -the regression tests don't try to build with the -gstabs option. -Otherwise, the valgrind build when ptest is enabled fails with the -error: - Stabs debuginfo not supported: - ../package/usr/lib/valgrind/ptest/memcheck/tests/deep_templates - ERROR: Function failed: split_and_strip_files - -Upstream-Status: Inappropriate [gstabs support is appropriate upstream, - but not for this distro] - -Signed-off-by: Dave Lerner <dave.lerner@windriver.com> - -diff --git a/configure.ac b/configure.ac -index 755dfb9..cc8b5e1 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1743,22 +1743,7 @@ AM_CONDITIONAL(DWARF4, test x$ac_have_dwarf4 = xyes) - CFLAGS=$safe_CFLAGS - - --# does this compiler support -gstabs ? -- --AC_MSG_CHECKING([if gcc accepts -gstabs]) -- --safe_CFLAGS=$CFLAGS --CFLAGS="-gstabs" --AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ -- return 0; --]])], [ --ac_have_gstabs=yes --AC_MSG_RESULT([yes]) --], [ - ac_have_gstabs=no --AC_MSG_RESULT([no]) --]) --CFLAGS=$safe_CFLAGS - AM_CONDITIONAL([HAVE_GSTABS], [test x$ac_have_gstabs = xyes]) - - diff --git a/meta/recipes-devtools/valgrind/valgrind/glibc.patch b/meta/recipes-devtools/valgrind/valgrind/glibc.patch deleted file mode 100644 index 863499d69d..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/glibc.patch +++ /dev/null @@ -1,44 +0,0 @@ -Backport of glibc 2.19 and 2.20 and 2.21 support. - -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@intel.com> - -Index: valgrind-3.10.1/configure.ac -=================================================================== ---- valgrind-3.10.1.orig/configure.ac -+++ valgrind-3.10.1/configure.ac -@@ -1018,6 +1018,34 @@ case "${GLIBC_VERSION}" in - DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; -+ 2.19) -+ AC_MSG_RESULT(2.19 family) -+ AC_DEFINE([GLIBC_2_19], 1, [Define to 1 if you're using glibc 2.19.x]) -+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ ;; -+ 2.20) -+ AC_MSG_RESULT(2.20 family) -+ AC_DEFINE([GLIBC_2_20], 1, [Define to 1 if you're using glibc 2.20.x]) -+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ ;; -+ 2.21) -+ AC_MSG_RESULT(2.21 family) -+ AC_DEFINE([GLIBC_2_21], 1, [Define to 1 if you're using glibc 2.21.x]) -+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ ;; -+ 2.22) -+ AC_MSG_RESULT(2.22 family) -+ AC_DEFINE([GLIBC_2_22], 1, [Define to 1 if you're using glibc 2.22.x]) -+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ ;; - darwin) - AC_MSG_RESULT(Darwin) - AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin]) diff --git a/meta/recipes-devtools/valgrind/valgrind/pass-maltivec-only-if-it-supported.patch b/meta/recipes-devtools/valgrind/valgrind/pass-maltivec-only-if-it-supported.patch deleted file mode 100644 index f8167cb2f0..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/pass-maltivec-only-if-it-supported.patch +++ /dev/null @@ -1,68 +0,0 @@ -Upstream-Status: Backport - -r14566 | florian | 2014-09-24 17:02:54 -0500 (Wed, 24 Sep 2014) | 4 lines - -The testbuckets none/tests/ppc{32,64} did not build in case the -toolchain did not support -maltivec -mabi=altivec. -This should work now. Fixes BZ #338731 - -Index: none/tests/ppc32/Makefile.am -=================================================================== ---- a/none/tests/ppc32/Makefile.am (revision 14565) -+++ b/none/tests/ppc32/Makefile.am (revision 14566) -@@ -72,8 +72,12 @@ - allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@ - - if HAS_ALTIVEC -+BUILD_FLAG_ALTIVEC = -maltivec -+BUILD_FLAG_ABI_ALTIVEC = -mabi=altivec - ALTIVEC_FLAG = -DHAS_ALTIVEC - else -+BUILD_FLAG_ALTIVEC = -+BUILD_FLAG_ABI_ALTIVEC = - ALTIVEC_FLAG = - endif - -@@ -101,11 +105,12 @@ - ISA_2_07_FLAG = - endif - --jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames -maltivec \ -- @FLAG_M32@ $(ALTIVEC_FLAG) -+jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames \ -+ @FLAG_M32@ $(ALTIVEC_FLAG) $(BUILD_FLAG_ALTIVEC) - --testVMX_CFLAGS = $(AM_CFLAGS) -O -g -Wall -maltivec -mabi=altivec -DALTIVEC \ -- -DGCC_COMPILER @FLAG_M32@ -+testVMX_CFLAGS = $(AM_CFLAGS) -O -g -Wall -DALTIVEC \ -+ -DGCC_COMPILER @FLAG_M32@ $(BUILD_FLAG_ALTIVEC) \ -+ $(BUILD_FLAG_ABI_ALTIVEC) - - test_isa_2_06_part1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(VSX_FLAG) \ - @FLAG_M32@ $(ALTIVEC_FLAG) $(BUILD_FLAG_VSX) -Index: none/tests/ppc64/Makefile.am -=================================================================== ---- a/none/tests/ppc64/Makefile.am (revision 14565) -+++ b/none/tests/ppc64/Makefile.am (revision 14566) -@@ -50,8 +50,10 @@ - allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@ - - if HAS_ALTIVEC -+BUILD_FLAG_ALTIVEC = -maltivec - ALTIVEC_FLAG = -DHAS_ALTIVEC - else -+BUILD_FLAG_ALTIVEC = - ALTIVEC_FLAG = - endif - -@@ -88,8 +90,8 @@ - test_isa_2_06_part3_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(VSX_FLAG) \ - @FLAG_M64@ $(ALTIVEC_FLAG) $(BUILD_FLAG_VSX) - --jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames -maltivec \ -- @FLAG_M64@ $(ALTIVEC_FLAG) -+jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames \ -+ @FLAG_M64@ $(ALTIVEC_FLAG) $(BUILD_FLAG_ALTIVEC) - - test_dfp1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(DFP_FLAG) \ - @FLAG_M64@ $(BUILD_FLAGS_DFP) diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch b/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch deleted file mode 100644 index 2319ab98c5..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch +++ /dev/null @@ -1,66 +0,0 @@ -Remove arm tests that don't compile - -Upstream-Status: Pending - -Corrects the original commit for the patch that removed ARM ptest CFLAGS -settings. Since the flags could be set by a user, the flags should -be kept in place during compilation. By keeping the original up-stream -CFLAGS for the tests, then additional tests successfully compile -for all tested ARM tunings. - -However, there were still two tests listed below that did not compile -for any beaglebone tuning that is valid for valgrind. With the updated -patch, the set of excluded ARM ptests and their respective build -failures are: - intdiv - fails for all beaglebone tunings with 2 errors: - {standard input}:(40 or 41): Error: selected processor does not - support Thumb mode `udiv r3,r9,r10' - {standard input}:(72 or 73): Error: selected processor does not - support Thumb mode `sdiv r3,r9,r10' - - vcvt_fixed_float_VFP - fails for all beaglebone tunings in one of - two ways: - with neon tuning (-mfpu=neon) fails with Internal Compiler Error - without neon tuning fails with 3 errors: - {standard input}:33: Error: selected FPU does not support - instruction -- `vcvt.f32.s32 s15,s15,#1' - {standard input}:58: Error: selected FPU does not support - instruction -- `vcvt.f32.s32 s15,s15,#32' - {standard input}:136: Error: selected FPU does not support - instruction -- `vcvt.f32.u32 s15,s15,#1' - -After applying this commit, the valgrind ARM ptests compile without -errors for tunings: - armv7[t][hf][b][-neon] cortexa8[t][hf][-neon] -where the tuning [option] was successfully compiled, both with -and without the 'option', and in combination with all other options. - -Signed-off-by: Dave Lerner <dave.lerner@windriver.com> - -Index: valgrind-3.10.1/none/tests/arm/Makefile.am -=================================================================== ---- valgrind-3.10.1.orig/none/tests/arm/Makefile.am 2015-05-19 15:11:59.224842927 -0500 -+++ valgrind-3.10.1/none/tests/arm/Makefile.am 2015-05-19 15:14:20.808847028 -0500 -@@ -17,9 +17,13 @@ - vfp.stdout.exp vfp.stderr.exp vfp.vgtest \ - vfpv4_fma.stdout.exp vfpv4_fma.stderr.exp vfpv4_fma.vgtest - -+# Remove the following tests which cause compiler errors for all tunings -+# available for beagle bone (see remove-arm-variant-specific.patch): -+# intdiv -+# vcvt_fixed_float_VFP -+ - check_PROGRAMS = \ - allexec \ -- intdiv \ - ldrt \ - ldrt_arm \ - neon128 \ -@@ -27,7 +31,6 @@ - v6intARM \ - v6intThumb \ - v6media \ -- vcvt_fixed_float_VFP \ - vfp \ - vfpv4_fma - diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 b/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 new file mode 100644 index 0000000000..887bfd2766 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 @@ -0,0 +1,233 @@ +gdbserver_tests/hgtls +cachegrind/tests/ann1 +callgrind/tests/simwork1 +callgrind/tests/simwork2 +callgrind/tests/simwork3 +callgrind/tests/simwork-both +callgrind/tests/simwork-cache +callgrind/tests/threads +callgrind/tests/threads-use +drd/tests/annotate_barrier +drd/tests/annotate_barrier_xml +drd/tests/annotate_hbefore +drd/tests/annotate_hb_err +drd/tests/annotate_hb_race +drd/tests/annotate_ignore_read +drd/tests/annotate_ignore_rw +drd/tests/annotate_ignore_rw2 +drd/tests/annotate_ignore_write +drd/tests/annotate_ignore_write2 +drd/tests/annotate_order_1 +drd/tests/annotate_order_2 +drd/tests/annotate_order_3 +drd/tests/annotate_publish_hg +drd/tests/annotate_rwlock +drd/tests/annotate_rwlock_hg +drd/tests/annotate_sem +drd/tests/annotate_smart_pointer +drd/tests/annotate_smart_pointer2 +drd/tests/annotate_spinlock +drd/tests/annotate_static +drd/tests/annotate_trace_memory +drd/tests/annotate_trace_memory_xml +drd/tests/atomic_var +drd/tests/bar_bad +drd/tests/bar_trivial +drd/tests/boost_thread +drd/tests/bug-235681 +drd/tests/bug322621 +drd/tests/circular_buffer +drd/tests/concurrent_close +drd/tests/custom_alloc +drd/tests/custom_alloc_fiw +drd/tests/dlopen +drd/tests/fork-parallel +drd/tests/fork-serial +drd/tests/fp_race +drd/tests/fp_race2 +drd/tests/fp_race_xml +drd/tests/free_is_write +drd/tests/free_is_write2 +drd/tests/hg01_all_ok +drd/tests/hg02_deadlock +drd/tests/hg03_inherit +drd/tests/hg04_race +drd/tests/hg05_race2 +drd/tests/hg06_readshared +drd/tests/hold_lock_1 +drd/tests/hold_lock_2 +drd/tests/linuxthreads_det +drd/tests/matinv +drd/tests/memory_allocation +drd/tests/monitor_example +drd/tests/new_delete +drd/tests/pth_barrier +drd/tests/pth_barrier2 +drd/tests/pth_barrier3 +drd/tests/pth_barrier_race +drd/tests/pth_barrier_reinit +drd/tests/pth_broadcast +drd/tests/pth_cancel_locked +drd/tests/pth_cleanup_handler +drd/tests/pth_cond_race +drd/tests/pth_cond_race2 +drd/tests/pth_detached2 +drd/tests/pth_detached3 +drd/tests/pth_detached_sem +drd/tests/pth_inconsistent_cond_wait +drd/tests/pth_mutex_reinit +drd/tests/pth_once +drd/tests/pth_process_shared_mutex +drd/tests/pth_spinlock +drd/tests/pth_uninitialized_cond +drd/tests/read_and_free_race +drd/tests/recursive_mutex +drd/tests/rwlock_race +drd/tests/rwlock_test +drd/tests/rwlock_type_checking +drd/tests/sem_as_mutex +drd/tests/sem_as_mutex2 +drd/tests/sem_as_mutex3 +drd/tests/sem_open +drd/tests/sem_open2 +drd/tests/sem_open3 +drd/tests/sem_open_traced +drd/tests/sem_wait +drd/tests/sigalrm +drd/tests/sigaltstack +drd/tests/std_atomic +drd/tests/std_string +drd/tests/std_thread +drd/tests/std_thread2 +drd/tests/str_tester +drd/tests/tc01_simple_race +drd/tests/tc02_simple_tls +drd/tests/tc03_re_excl +drd/tests/tc04_free_lock +drd/tests/tc05_simple_race +drd/tests/tc06_two_races +drd/tests/tc07_hbl1 +drd/tests/tc08_hbl2 +drd/tests/tc10_rec_lock +drd/tests/tc11_XCHG +drd/tests/tc12_rwl_trivial +drd/tests/tc13_laog1 +drd/tests/tc15_laog_lockdel +drd/tests/tc16_byterace +drd/tests/tc17_sembar +drd/tests/tc18_semabuse +drd/tests/tc19_shadowmem +drd/tests/tc21_pthonce +drd/tests/tc22_exit_w_lock +drd/tests/tc23_bogus_condwait +helgrind/tests/annotate_rwlock +helgrind/tests/annotate_smart_pointer +helgrind/tests/bar_bad +helgrind/tests/bar_trivial +helgrind/tests/bug322621 +helgrind/tests/cond_init_destroy +helgrind/tests/cond_timedwait_invalid +helgrind/tests/cond_timedwait_test +helgrind/tests/free_is_write +helgrind/tests/hg01_all_ok +helgrind/tests/hg03_inherit +helgrind/tests/hg04_race +helgrind/tests/hg05_race2 +helgrind/tests/hg06_readshared +helgrind/tests/locked_vs_unlocked1_fwd +helgrind/tests/locked_vs_unlocked1_rev +helgrind/tests/locked_vs_unlocked2 +helgrind/tests/locked_vs_unlocked3 +helgrind/tests/pth_barrier1 +helgrind/tests/pth_barrier2 +helgrind/tests/pth_barrier3 +helgrind/tests/pth_destroy_cond +helgrind/tests/rwlock_race +helgrind/tests/rwlock_test +helgrind/tests/shmem_abits +helgrind/tests/stackteardown +helgrind/tests/t2t_laog +helgrind/tests/tc01_simple_race +helgrind/tests/tc02_simple_tls +helgrind/tests/tc03_re_excl +helgrind/tests/tc04_free_lock +helgrind/tests/tc05_simple_race +helgrind/tests/tc06_two_races +helgrind/tests/tc06_two_races_xml +helgrind/tests/tc07_hbl1 +helgrind/tests/tc08_hbl2 +helgrind/tests/tc09_bad_unlock +helgrind/tests/tc10_rec_lock +helgrind/tests/tc11_XCHG +helgrind/tests/tc12_rwl_trivial +helgrind/tests/tc13_laog1 +helgrind/tests/tc14_laog_dinphils +helgrind/tests/tc15_laog_lockdel +helgrind/tests/tc16_byterace +helgrind/tests/tc17_sembar +helgrind/tests/tc18_semabuse +helgrind/tests/tc19_shadowmem +helgrind/tests/tc20_verifywrap +helgrind/tests/tc21_pthonce +helgrind/tests/tc22_exit_w_lock +helgrind/tests/tc23_bogus_condwait +helgrind/tests/tc24_nonzero_sem +memcheck/tests/accounting +memcheck/tests/addressable +memcheck/tests/arm64-linux/scalar +memcheck/tests/atomic_incs +memcheck/tests/badaddrvalue +memcheck/tests/badfree +memcheck/tests/badfree-2trace +memcheck/tests/badfree3 +memcheck/tests/badjump +memcheck/tests/badjump2 +memcheck/tests/badloop +memcheck/tests/badpoll +memcheck/tests/badrw +memcheck/tests/big_blocks_freed_list +memcheck/tests/brk2 +memcheck/tests/dw4 +memcheck/tests/err_disable4 +memcheck/tests/err_disable_arange1 +memcheck/tests/leak-autofreepool-5 +memcheck/tests/linux/lsframe1 +memcheck/tests/linux/lsframe2 +memcheck/tests/linux/with-space +memcheck/tests/origin5-bz2 +memcheck/tests/origin6-fp +memcheck/tests/partial_load_dflt +memcheck/tests/pdb-realloc2 +memcheck/tests/sh-mem +memcheck/tests/sh-mem-random +memcheck/tests/sigaltstack +memcheck/tests/sigkill +memcheck/tests/signal2 +memcheck/tests/threadname +memcheck/tests/threadname_xml +memcheck/tests/unit_oset +memcheck/tests/varinfo1 +memcheck/tests/varinfo2 +memcheck/tests/varinfo3 +memcheck/tests/varinfo4 +memcheck/tests/varinfo5 +memcheck/tests/varinfo6 +memcheck/tests/varinforestrict +memcheck/tests/vcpu_bz2 +memcheck/tests/vcpu_fbench +memcheck/tests/vcpu_fnfns +memcheck/tests/wcs +memcheck/tests/wrap1 +memcheck/tests/wrap2 +memcheck/tests/wrap3 +memcheck/tests/wrap4 +memcheck/tests/wrap5 +memcheck/tests/wrap6 +memcheck/tests/wrap7 +memcheck/tests/wrap8 +memcheck/tests/wrapmalloc +memcheck/tests/wrapmallocstatic +memcheck/tests/writev1 +memcheck/tests/xml1 +memcheck/tests/linux/stack_changes +memcheck/tests/linux/timerfd-syscall diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-for-all b/meta/recipes-devtools/valgrind/valgrind/remove-for-all new file mode 100644 index 0000000000..cb8d10b18f --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/remove-for-all @@ -0,0 +1,8 @@ +none/tests/amd64/fb_test_amd64 +gdbserver_tests/hginfo +memcheck/tests/supp_unknown +helgrind/tests/tls_threads +drd/tests/bar_bad_xml +drd/tests/pth_barrier_thr_cr +drd/tests/thread_name_xml +massif/tests/deep-D diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch b/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch deleted file mode 100644 index 1c640ffb71..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch +++ /dev/null @@ -1,75 +0,0 @@ -Remove test apps not building with ppc and PTEST - -For mpc8316-rdb in none/tests/ppc32, the oe compiler options are -inconsistent with the imposed test compiler options generating errors -as follows: -test_isa_2_07_part1 -test_isa_2_07_part2 -test_tm -test_touch_tm - : unrecognized command line option '-mhtm' - -jm-insns -testVMX - : AltiVec not supported in this target - -For the following tests, their inline assembler is inconsistent with -the ppce300c3 variant: -round.c:393 -power5+_round.c:98 - : impossible constraint in 'asm' - -For the following tests, with both mpc8316-rdb and with qemuppc bsp, -the inline assember is inconsistent with the oe compiler machine -tuning: -In memcheck/tests/ppc32 - power_ISA2_05.c:56 -In none/tests/ppc32 - test_dfp1.c:85 - test_dfp2.c:160 - test_dfp3.c:157 - test_dfp4.c:73 - test_dfp5.c:73 - : impossible constraint in 'asm' - -Upstream-Status: Pending - -Signed-off-by: Dave Lerner <dave.lerner@windriver.com> - -Index: valgrind-3.10.0/memcheck/tests/ppc32/Makefile.am -=================================================================== ---- valgrind-3.10.0.orig/memcheck/tests/ppc32/Makefile.am -+++ valgrind-3.10.0/memcheck/tests/ppc32/Makefile.am -@@ -7,8 +7,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ - power_ISA2_05.stderr.exp power_ISA2_05.stdout.exp power_ISA2_05.vgtest \ - power_ISA2_05.stdout.exp_Without_FPPO - --check_PROGRAMS = \ -- power_ISA2_05 -+check_PROGRAMS = - - power_ISA2_05_CFLAGS = $(AM_CFLAGS) $(WERROR) -Winline -Wall -Wshadow -g \ - -I$(top_srcdir)/include @FLAG_M32@ -Index: valgrind-3.10.0/none/tests/ppc32/Makefile.am -=================================================================== ---- valgrind-3.10.0.orig/none/tests/ppc32/Makefile.am -+++ valgrind-3.10.0/none/tests/ppc32/Makefile.am -@@ -52,16 +52,8 @@ check_PROGRAMS = \ - allexec \ - bug129390-ppc32 \ - bug139050-ppc32 \ -- ldstrev lsw jm-insns mftocrf mcrfs round test_fx test_gx \ -- testVMX twi tw xlc_dbl_u32 power5+_round power6_bcmp \ -- test_isa_2_06_part1 \ -- test_isa_2_06_part2 \ -- test_isa_2_06_part3 \ -- test_dfp1 test_dfp2 test_dfp3 test_dfp4 test_dfp5 \ -- test_isa_2_07_part1 \ -- test_isa_2_07_part2 \ -- test_tm \ -- test_touch_tm \ -+ ldstrev lsw mftocrf mcrfs test_fx test_gx \ -+ twi tw xlc_dbl_u32 power6_bcmp \ - ldst_multiple \ - data-cache-instructions - diff --git a/meta/recipes-devtools/valgrind/valgrind/run-ptest b/meta/recipes-devtools/valgrind/valgrind/run-ptest index f9a72ec4a9..15cf03f9d2 100755 --- a/meta/recipes-devtools/valgrind/valgrind/run-ptest +++ b/meta/recipes-devtools/valgrind/valgrind/run-ptest @@ -2,11 +2,95 @@ # run-ptest - 'ptest' test infrastructure shell script that # wraps the valgrind regression script vg_regtest. -# Must be run in the /usr/lib/valgrind/ptest directory. # # Dave Lerner <dave.lerner@windriver.com> +# Randy MacLeod <Randy.MacLeod@windriver.com> ############################################################### -VALGRINDLIB=@libdir@/valgrind -tests/vg_regtest --all \ - --valgrind=/usr/bin/valgrind --valgrind-lib=$VALGRINDLIB \ - --yocto-ptest +VALGRIND_LIB=@libdir@/valgrind +VALGRIND_LIBEXECDIR=@libexecdir@/valgrind +VALGRIND_BIN=@bindir@/valgrind + +LOG="${VALGRIND_LIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log" + +TOOLS="memcheck cachegrind callgrind helgrind drd massif dhat lackey none" +EXP_TOOLS="exp-bbv" + +GDB_BIN=@bindir@/gdb +cd ${VALGRIND_LIB}/ptest && ./gdbserver_tests/make_local_links ${GDB_BIN} + +echo "Hide valgrind tests that are non-deterministic" +echo "Reported at https://bugs.kde.org/show_bug.cgi?id=430321" +for i in `cat remove-for-all`; do + mv $i.vgtest $i.IGNORE; +done + +arch=`arch` +if [ "$arch" = "aarch64" ]; then + echo "Aarch64: Hide valgrind tests that result in defunct process and then out of memory" + for i in `cat remove-for-aarch64`; do + mv $i.vgtest $i.IGNORE; + done +fi + +echo "Run non-deterministic tests using taskset to limit them to a single core." +for i in `cat taskset_nondeterministic_tests`; do + # The remove-for-aarch64 and taskset_nondeterministic_tests may overlap so + # check if a file exist. + if test -f "${i}.vgtest"; then + taskset 0x00000001 perl tests/vg_regtest --valgrind=${VALGRIND_BIN} --valgrind-lib=${VALGRIND_LIBEXECDIR} --yocto-ptest $i 2>&1|tee -a ${LOG} + mv $i.vgtest $i.IGNORE + fi +done + +cd ${VALGRIND_LIB}/ptest && ./tests/vg_regtest \ + --valgrind=${VALGRIND_BIN} \ + --valgrind-lib=${VALGRIND_LIBEXECDIR} \ + --yocto-ptest \ + gdbserver_tests ${TOOLS} ${EXP_TOOLS} \ + 2>&1|tee -a ${LOG} + +cd ${VALGRIND_LIB}/ptest && \ + ./tests/post_regtest_checks $(pwd) \ + gdbserver_tests ${TOOLS} ${EXP_TOOLS} \ + 2>&1|tee -a ${LOG} + +echo "Restore non-deterministic tests" +for i in `cat taskset_nondeterministic_tests`; do + if test -f "${i}.vgtest.IGNORE"; then + mv $i.IGNORE $i.vgtest; + fi +done + +if [ "$arch" = "aarch64" ]; then + echo "Aarch64: Restore valgrind tests that result in defunct process and then out of memory" + for i in `cat remove-for-aarch64`; do + mv $i.IGNORE $i.vgtest; + done +fi + +echo "Restore valgrind tests that are non-deterministc" +for i in `cat remove-for-all`; do + mv $i.IGNORE $i.vgtest; +done + +echo "Failed test details..." +failed_tests=`grep FAIL: ${LOG} | awk '{print $2}'` +for test in $failed_tests; do + for diff_results in `ls $test*.diff`; do + echo $diff_results + echo '************' + cat $diff_results + done +done + +passed=`grep PASS: ${LOG}|wc -l` +failed=`grep FAIL: ${LOG}|wc -l` +skipped=`grep SKIP: ${LOG}|wc -l` +all=$((passed + failed + skipped)) + +( echo "=== Test Summary ===" + echo "TOTAL: ${all}" + echo "PASSED: ${passed}" + echo "FAILED: ${failed}" + echo "SKIPPED: ${skipped}" +) | tee -a /${LOG} diff --git a/meta/recipes-devtools/valgrind/valgrind/s390x_vec_op_t.patch b/meta/recipes-devtools/valgrind/valgrind/s390x_vec_op_t.patch new file mode 100644 index 0000000000..bde1241dc7 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/s390x_vec_op_t.patch @@ -0,0 +1,35 @@ +From 8154d38bac5cdb3675cfdaf562ab9da01988b263 Mon Sep 17 00:00:00 2001 +From: Yi Fan Yu <yifan.yu@windriver.com> +Date: Wed, 17 Mar 2021 12:16:31 -0400 +Subject: [PATCH 19/20] remove s390x_vec_op_t + +s390x_vec_op_t is not needed anywhere, only elements of enum are accessed +removing it ensures that valgrind can be built with -fno-common option + +Fixes +ld: ../../VEX/libvex-amd64-linux.a(libvex_amd64_linux_a-guest_s390_helpers.o):/usr/src/debug/valgrind/3.15.0-r0/build/VEX/../../valgrind-3.15.0/VEX/priv/guest_s390_defs.h:289: multiple definition of `s390x_vec_op_t'; ../../VEX/libvexmultiarch-amd64-linux.a(libvexmultiarch_amd64_linux_a-multiarch_main_main.o):/usr/src/debug/valgrind/3.15.0-r0/build/VEX/../../valgrind-3.15.0/VEX/priv/guest_s390_defs.h:289: first defined here + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> +--- + VEX/priv/guest_s390_defs.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/VEX/priv/guest_s390_defs.h b/VEX/priv/guest_s390_defs.h +index 9054290..dab8002 100644 +--- a/VEX/priv/guest_s390_defs.h ++++ b/VEX/priv/guest_s390_defs.h +@@ -284,7 +284,7 @@ typedef enum { + S390_VEC_OP_VBPERM, + S390_VEC_OP_VMSL, + S390_VEC_OP_LAST // supposed to be the last element in enum +-} s390x_vec_op_t; ++}; + + /* Arguments of s390x_dirtyhelper_vec_op(...) which are packed into one + ULong variable. +-- +2.29.2 + diff --git a/meta/recipes-devtools/valgrind/valgrind/sepbuildfix.patch b/meta/recipes-devtools/valgrind/valgrind/sepbuildfix.patch deleted file mode 100644 index 5db0ef8a3f..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/sepbuildfix.patch +++ /dev/null @@ -1,235 +0,0 @@ -Fix out of tree builds. The paths to these files need to be fully specified in -the out of tree build case. glibc-2.X.supp is a generated file so the full path -is deliberately not specified in that case. - -RP 2013/03/23 - -Upstream-Status: Pending - -Index: valgrind-3.9.0/configure.ac -=================================================================== ---- valgrind-3.9.0.orig/configure.ac -+++ valgrind-3.9.0/configure.ac -@@ -325,26 +325,26 @@ case "${host_os}" in - 9.*) - AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_5, [Darwin / Mac OS X version]) -- DEFAULT_SUPP="darwin9.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="darwin9-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin9-drd.supp ${DEFAULT_SUPP}" - ;; - 10.*) - AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_6, [Darwin / Mac OS X version]) -- DEFAULT_SUPP="darwin10.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin10.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" - ;; - 11.*) - AC_MSG_RESULT([Darwin 11.x (${kernel}) / Mac OS X 10.7 Lion]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_7, [Darwin / Mac OS X version]) -- DEFAULT_SUPP="darwin11.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin11.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" - ;; - 12.*) - AC_MSG_RESULT([Darwin 12.x (${kernel}) / Mac OS X 10.8 Mountain Lion]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_8, [Darwin / Mac OS X version]) -- DEFAULT_SUPP="darwin12.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin12.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" - ;; - *) - AC_MSG_RESULT([unsupported (${kernel})]) -@@ -799,124 +799,124 @@ case "${GLIBC_VERSION}" in - 2.2) - AC_MSG_RESULT(2.2 family) - AC_DEFINE([GLIBC_2_2], 1, [Define to 1 if you're using glibc 2.2.x]) -- DEFAULT_SUPP="glibc-2.2.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.2.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - - 2.3) - AC_MSG_RESULT(2.3 family) - AC_DEFINE([GLIBC_2_3], 1, [Define to 1 if you're using glibc 2.3.x]) -- DEFAULT_SUPP="glibc-2.3.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.3.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - - 2.4) - AC_MSG_RESULT(2.4 family) - AC_DEFINE([GLIBC_2_4], 1, [Define to 1 if you're using glibc 2.4.x]) -- DEFAULT_SUPP="glibc-2.4.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.4.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - - 2.5) - AC_MSG_RESULT(2.5 family) - AC_DEFINE([GLIBC_2_5], 1, [Define to 1 if you're using glibc 2.5.x]) -- DEFAULT_SUPP="glibc-2.5.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.5.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - 2.6) - AC_MSG_RESULT(2.6 family) - AC_DEFINE([GLIBC_2_6], 1, [Define to 1 if you're using glibc 2.6.x]) -- DEFAULT_SUPP="glibc-2.6.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.6.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - 2.7) - AC_MSG_RESULT(2.7 family) - AC_DEFINE([GLIBC_2_7], 1, [Define to 1 if you're using glibc 2.7.x]) - DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - 2.8) - AC_MSG_RESULT(2.8 family) - AC_DEFINE([GLIBC_2_8], 1, [Define to 1 if you're using glibc 2.8.x]) - DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - 2.9) - AC_MSG_RESULT(2.9 family) - AC_DEFINE([GLIBC_2_9], 1, [Define to 1 if you're using glibc 2.9.x]) - DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - 2.10) - AC_MSG_RESULT(2.10 family) - AC_DEFINE([GLIBC_2_10], 1, [Define to 1 if you're using glibc 2.10.x]) - DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - 2.11) - AC_MSG_RESULT(2.11 family) - AC_DEFINE([GLIBC_2_11], 1, [Define to 1 if you're using glibc 2.11.x]) - DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - 2.12) - AC_MSG_RESULT(2.12 family) - AC_DEFINE([GLIBC_2_12], 1, [Define to 1 if you're using glibc 2.12.x]) - DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - 2.13) - AC_MSG_RESULT(2.13 family) - AC_DEFINE([GLIBC_2_13], 1, [Define to 1 if you're using glibc 2.13.x]) - DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - 2.14) - AC_MSG_RESULT(2.14 family) - AC_DEFINE([GLIBC_2_14], 1, [Define to 1 if you're using glibc 2.14.x]) - DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - 2.15) - AC_MSG_RESULT(2.15 family) - AC_DEFINE([GLIBC_2_15], 1, [Define to 1 if you're using glibc 2.15.x]) - DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - 2.16) - AC_MSG_RESULT(2.16 family) - AC_DEFINE([GLIBC_2_16], 1, [Define to 1 if you're using glibc 2.16.x]) - DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - 2.17) - AC_MSG_RESULT(2.17 family) - AC_DEFINE([GLIBC_2_17], 1, [Define to 1 if you're using glibc 2.17.x]) - DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - 2.18) - AC_MSG_RESULT(2.18 family) - AC_DEFINE([GLIBC_2_18], 1, [Define to 1 if you're using glibc 2.18.x]) - DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - darwin) - AC_MSG_RESULT(Darwin) -@@ -926,7 +926,7 @@ case "${GLIBC_VERSION}" in - bionic) - AC_MSG_RESULT(Bionic) - AC_DEFINE([BIONIC_LIBC], 1, [Define to 1 if you're using Bionic]) -- DEFAULT_SUPP="bionic.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/bionic.supp ${DEFAULT_SUPP}" - ;; - - *) -@@ -943,11 +943,11 @@ AC_SUBST(GLIBC_VERSION) - # attempt to detect whether such libraries are installed on the - # build machine (or even if any X facilities are present); just - # add the suppressions antidisirregardless. --DEFAULT_SUPP="xfree-4.supp ${DEFAULT_SUPP}" --DEFAULT_SUPP="xfree-3.supp ${DEFAULT_SUPP}" -+DEFAULT_SUPP="$srcdir/xfree-4.supp ${DEFAULT_SUPP}" -+DEFAULT_SUPP="$srcdir/xfree-3.supp ${DEFAULT_SUPP}" - - # Add glibc and X11 suppressions for exp-sgcheck --DEFAULT_SUPP="exp-sgcheck.supp ${DEFAULT_SUPP}" -+DEFAULT_SUPP="$srcdir/exp-sgcheck.supp ${DEFAULT_SUPP}" - - - #---------------------------------------------------------------------------- diff --git a/meta/recipes-devtools/valgrind/valgrind/taskset_nondeterministic_tests b/meta/recipes-devtools/valgrind/valgrind/taskset_nondeterministic_tests new file mode 100644 index 0000000000..e15100ade7 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/taskset_nondeterministic_tests @@ -0,0 +1,2 @@ +helgrind/tests/hg05_race2 +helgrind/tests/tc09_bad_unlock diff --git a/meta/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch b/meta/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch new file mode 100644 index 0000000000..adea405213 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch @@ -0,0 +1,44 @@ +From d134dafc2f11e0d247420a0ba360bcdef77b4093 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy <armccurdy@gmail.com> +Date: Tue, 19 Jan 2016 16:00:00 -0800 +Subject: [PATCH] use appropriate -march/-mcpu/-mfpu for ARM test apps + +Ensure that test apps in none/tests/arm are compiled with appropriate +-march/-mcpu/-mfpu flags to support the instructions being tested. +The aim is to build all tests, even ones which may not run correctly +on all target CPUs. + +For tests requiring armv7ve instructions, ensure that we set both +-march=armv7ve and -mcpu=cortex-a15 (since some TUNE_CCARGS may set +-march=armv7-a and adding -mcpu=cortex-a15 alone is not enough to +over-ride that). + +See similar cases in none/tests/arm/Makefile.am + +Upstream-Status: Pending + +Signed-off-by: Andre McCurdy <armccurdy@gmail.com> +--- + none/tests/arm/Makefile.am | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am +index 4507a20..825290f 100644 +--- a/none/tests/arm/Makefile.am ++++ b/none/tests/arm/Makefile.am +@@ -62,8 +62,10 @@ neon64_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \ + -mfpu=neon \ + -mthumb + +-intdiv_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a15 -mthumb ++intdiv_CFLAGS = $(AM_CFLAGS) -g -march=armv7ve -mcpu=cortex-a15 -mthumb + ldrt_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb + ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm + +-vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a15 -mfpu=vfpv4 -marm ++vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mfpu=vfpv3 ++ ++vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -march=armv7ve -mcpu=cortex-a15 -mfpu=vfpv4 -marm +-- +1.9.1 + diff --git a/meta/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch b/meta/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch new file mode 100644 index 0000000000..d04297dca8 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch @@ -0,0 +1,45 @@ +From 005bd11809a1ce65e9f2c28e884354a4741650b9 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy <armccurdy@gmail.com> +Date: Tue, 13 Dec 2016 11:29:55 +0800 +Subject: [PATCH] make ld-XXX.so strlen intercept optional + +Hack: Depending on how glibc was compiled (e.g. optimised for size or +built with _FORTIFY_SOURCE enabled) the strlen symbol might not be +found in ld-XXX.so. Therefore although we should still try to +intercept it, don't make it mandatory to do so. + +Upstream-Status: Inappropriate + +Signed-off-by: Andre McCurdy <armccurdy@gmail.com> +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + coregrind/m_redir.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c +index ff35009..d7d6816 100644 +--- a/coregrind/m_redir.c ++++ b/coregrind/m_redir.c +@@ -1275,7 +1275,18 @@ static void add_hardwired_spec (const HChar* sopatt, const HChar* fnpatt, + spec->to_addr = to_addr; + spec->isWrap = False; + spec->isGlobal = False; +- spec->mandatory = mandatory; ++ ++ /* Hack: Depending on how glibc was compiled (e.g. optimised for size or ++ built with _FORTIFY_SOURCE enabled) the strlen symbol might not be found. ++ Therefore although we should still try to intercept it, don't make it ++ mandatory to do so. We over-ride "mandatory" here to avoid the need to ++ patch the many different architecture specific callers to ++ add_hardwired_spec(). */ ++ if (0==VG_(strcmp)("strlen", fnpatt)) ++ spec->mandatory = NULL; ++ else ++ spec->mandatory = mandatory; ++ + /* VARIABLE PARTS */ + spec->mark = False; /* not significant */ + spec->done = False; /* not significant */ +-- +1.9.1 + diff --git a/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch b/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch deleted file mode 100644 index f72e9ca03a..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch +++ /dev/null @@ -1,25 +0,0 @@ - -Upstream-Status: Inappropriate [embedded config] -Signed-off-by: Saul Wold <sgw@linux.intel.com> - -Index: valgrind-3.10.0/none/tests/Makefile.am -=================================================================== ---- valgrind-3.10.0.orig/none/tests/Makefile.am -+++ valgrind-3.10.0/none/tests/Makefile.am -@@ -280,7 +280,6 @@ threaded_fork_LDADD = -lpthread - threadederrno_LDADD = -lpthread - tls_SOURCES = tls.c tls2.c - tls_DEPENDENCIES = tls.so tls2.so --tls_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests - tls_LDADD = tls.so tls2.so -lpthread - tls_so_SOURCES = tls_so.c - tls_so_DEPENDENCIES = tls2.so -@@ -288,7 +287,7 @@ if VGCONF_OS_IS_DARWIN - tls_so_LDFLAGS = -dynamic -dynamiclib -all_load -fpic - tls_so_LDADD = `pwd`/tls2.so - else -- tls_so_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests -shared -fPIC -+ tls_so_LDFLAGS = -shared -fPIC - tls_so_LDADD = tls2.so - endif - tls_so_CFLAGS = $(AM_CFLAGS) -fPIC |