diff options
Diffstat (limited to 'meta-oe/recipes-support/gperftools/gperftools')
6 files changed, 83 insertions, 115 deletions
diff --git a/meta-oe/recipes-support/gperftools/gperftools/0001-Support-Atomic-ops-on-clang.patch b/meta-oe/recipes-support/gperftools/gperftools/0001-Support-Atomic-ops-on-clang.patch deleted file mode 100644 index 2fd21c2783..0000000000 --- a/meta-oe/recipes-support/gperftools/gperftools/0001-Support-Atomic-ops-on-clang.patch +++ /dev/null @@ -1,31 +0,0 @@ -From aa0a63209af6813d87255ec3ab339f2dbbf27d6d Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 6 Mar 2017 13:38:46 -0800 -Subject: [PATCH] Support Atomic ops on clang - -clang pretends to be gcc 4.2 which is a lie -it actually supports a lot more features then -gcc 4.2, here it depends on gcc 4.7 to enable -the atomics and fails for clang - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Upstream-Status: Pending - ---- - src/base/atomicops.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/base/atomicops.h b/src/base/atomicops.h -index dac95be..390733c 100644 ---- a/src/base/atomicops.h -+++ b/src/base/atomicops.h -@@ -124,7 +124,7 @@ - #include "base/atomicops-internals-linuxppc.h" - #elif defined(__GNUC__) && defined(__mips__) - #include "base/atomicops-internals-mips.h" --#elif defined(__GNUC__) && GCC_VERSION >= 40700 -+#elif defined(__GNUC__) && GCC_VERSION >= 40700 || defined(__clang__) - #include "base/atomicops-internals-gcc.h" - #elif defined(__clang__) && CLANG_VERSION >= 30400 - #include "base/atomicops-internals-gcc.h" diff --git a/meta-oe/recipes-support/gperftools/gperftools/0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch b/meta-oe/recipes-support/gperftools/gperftools/0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch index e3e857f0c2..2ea54e48c9 100644 --- a/meta-oe/recipes-support/gperftools/gperftools/0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch +++ b/meta-oe/recipes-support/gperftools/gperftools/0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch @@ -11,12 +11,14 @@ Upstream-Status: Pending configure.ac | 2 ++ 1 file changed, 2 insertions(+) +diff --git a/configure.ac b/configure.ac +index 68fd51c..4cb71fe 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,8 @@ case "$host" in - *-cygwin*) default_enable_heap_checker=no; default_enable_cpu_profiler=no;; - *-freebsd*) default_enable_heap_checker=no;; - *-darwin*) default_enable_heap_checker=no;; + need_nanosleep=no;; + *-cygwin*) default_enable_cpu_profiler=no;; + *-linux*) default_enable_heap_checker=yes; heap_checker_supported=yes;; + *-musl*) default_enable_heap_checker=no; default_enable_heap_profiler=no; + default_enable_debugalloc=no; default_enable_libunwind=no; esac diff --git a/meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch b/meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch deleted file mode 100644 index baaaa4b53b..0000000000 --- a/meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 696674a800cb6d2070897a565b92d7e63022a8f1 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 16 Jul 2017 15:51:28 -0700 -Subject: [PATCH] fix build with musl libc - -Patch from https://github.com/gperftools/gperftools/pull/765/ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/malloc_hook_mmap_linux.h | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - ---- a/src/malloc_hook_mmap_linux.h -+++ b/src/malloc_hook_mmap_linux.h -@@ -45,6 +45,10 @@ - #include <sys/syscall.h> - #include <unistd.h> - -+#ifndef __GLIBC__ -+typedef off64_t __off64_t; -+#endif -+ - // The x86-32 case and the x86-64 case differ: - // 32b has a mmap2() syscall, 64b does not. - // 64b and 32b have different calling conventions for mmap(). -@@ -175,7 +179,7 @@ extern "C" void* mmap64(void *start, siz - return result; - } - --# if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) -+# if defined(__GLIBC__) && (!defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH)) - - extern "C" void* mmap(void *start, size_t length, int prot, int flags, - int fd, off_t offset) __THROW { diff --git a/meta-oe/recipes-support/gperftools/gperftools/0001-src-mmap_hook.cc-Fix-build-for-32bit-machine.patch b/meta-oe/recipes-support/gperftools/gperftools/0001-src-mmap_hook.cc-Fix-build-for-32bit-machine.patch new file mode 100644 index 0000000000..1142df0be9 --- /dev/null +++ b/meta-oe/recipes-support/gperftools/gperftools/0001-src-mmap_hook.cc-Fix-build-for-32bit-machine.patch @@ -0,0 +1,59 @@ +From d675808d300278a9e7143428cfecf3fda61cc9a2 Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Thu, 21 Mar 2024 10:59:29 +0000 +Subject: [PATCH] src/mmap_hook.cc: Fix build for 32bit machine + +Fixed build error on 32bit machine: + +../git/src/mmap_hook.cc:309:31: error: static assertion failed + 309 | static_assert(sizeof(int32_t) == sizeof(off_t), ""); + +This is because oe's off_t is 64bit on both 32 and 64bit system, which is the +default value of glibc, so the assertion would be failed on 32bit system, and +remove mmap() and mmap64() to fix the redefined error. + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +--- + src/mmap_hook.cc | 22 ---------------------- + 1 file changed, 22 deletions(-) + +diff --git a/src/mmap_hook.cc b/src/mmap_hook.cc +index 0a0f62f..27425e4 100644 +--- a/src/mmap_hook.cc ++++ b/src/mmap_hook.cc +@@ -302,30 +302,8 @@ void* mmap(void* start, size_t length, int prot, int flags, int fd, off_t off) _ + + #define HOOKED_MMAP + +-#elif defined(DEFINED_DO_MMAP) && defined(__linux__) && !GOOD_LINUX_SYSTEM +-// Linuxes with 32-bit off_t. We're being careful with mmap64 being +-// 64-bit and mmap being 32-bit. +- +-static_assert(sizeof(int32_t) == sizeof(off_t), ""); +- +-extern "C" void* mmap64(void* start, size_t length, int prot, int flags, int fd, int64_t off) +- __THROW ATTRIBUTE_SECTION(malloc_hook); +-extern "C" void* mmap(void* start, size_t length, int prot, int flags, int fd, off_t off) +- __THROW ATTRIBUTE_SECTION(malloc_hook); +- +-void* mmap(void *start, size_t length, int prot, int flags, int fd, off_t off) __THROW { +- return do_mmap_with_hooks(start, length, prot, flags, fd, off); +-} +- +-void* mmap64(void *start, size_t length, int prot, int flags, int fd, int64_t off) __THROW { +- return do_mmap_with_hooks(start, length, prot, flags, fd, off); +-} +- +-#define HOOKED_MMAP +- + #endif // Linux/32-bit off_t case + +- + #ifdef HOOKED_MMAP + + extern "C" int munmap(void* start, size_t length) __THROW ATTRIBUTE_SECTION(malloc_hook); +-- +2.35.5 + diff --git a/meta-oe/recipes-support/gperftools/gperftools/ppc-musl.patch b/meta-oe/recipes-support/gperftools/gperftools/ppc-musl.patch index 4cf182ad64..800fa3a84f 100644 --- a/meta-oe/recipes-support/gperftools/gperftools/ppc-musl.patch +++ b/meta-oe/recipes-support/gperftools/gperftools/ppc-musl.patch @@ -1,37 +1,32 @@ -Compatibility fixes for musl. +From 328805fd16930deefda400a77e9c2c5d17d04d29 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 13 Mar 2021 00:42:25 -0800 +Subject: [PATCH] Compatibility fixes for musl. ---- a/m4/pc_from_ucontext.m4 -+++ b/m4/pc_from_ucontext.m4 -@@ -34,6 +34,7 @@ AC_DEFUN([AC_PC_FROM_UCONTEXT], - pc_fields="$pc_fields uc_mcontext.arm_pc" # Linux (arm arch 5) - pc_fields="$pc_fields uc_mcontext.cr0_hi" # Linux (e2k) - pc_fields="$pc_fields uc_mcontext.gp_regs[[PT_NIP]]" # Suse SLES 11 (ppc64) -+ pc_fields="$pc_fields uc_mcontext.gregs[[PT_NIP]]" - pc_fields="$pc_fields uc_mcontext.mc_eip" # FreeBSD (i386) - pc_fields="$pc_fields uc_mcontext.mc_srr0" # FreeBSD (powerpc, powerpc64) - pc_fields="$pc_fields uc_mcontext.mc_rip" # FreeBSD (x86_64 [untested]) -@@ -77,7 +78,8 @@ AC_DEFUN([AC_PC_FROM_UCONTEXT], - pc_field_found=true) - elif test "x$ac_cv_header_ucontext_h" = xyes; then - AC_TRY_COMPILE([#define _GNU_SOURCE 1 -- #include <ucontext.h>], -+ #include <ucontext.h> -+ #include <asm/ptrace.h>], - [ucontext_t u; return u.$pc_field == 0;], - AC_DEFINE_UNQUOTED(PC_FROM_UCONTEXT, $pc_field, - How to access the PC from a struct ucontext) +--- +Upstream-Status: Pending + + src/getpc.h | 4 ++++ + src/stacktrace_powerpc-linux-inl.h | 8 ++++++-- + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/src/getpc.h b/src/getpc.h +index 87d18b6..c569731 100644 --- a/src/getpc.h +++ b/src/getpc.h -@@ -68,6 +68,9 @@ +@@ -68,6 +68,10 @@ typedef ucontext ucontext_t; #endif +#if defined(__powerpc__) && !defined(PT_NIP) +#define PT_NIP 32 +#endif ++ + namespace tcmalloc { + namespace getpc { - // Take the example where function Foo() calls function Bar(). For - // many architectures, Bar() is responsible for setting up and tearing +diff --git a/src/stacktrace_powerpc-linux-inl.h b/src/stacktrace_powerpc-linux-inl.h +index 883e7d2..212bd25 100644 --- a/src/stacktrace_powerpc-linux-inl.h +++ b/src/stacktrace_powerpc-linux-inl.h @@ -186,7 +186,7 @@ static int GET_STACK_TRACE_OR_FRAMES { diff --git a/meta-oe/recipes-support/gperftools/gperftools/sgidef.patch b/meta-oe/recipes-support/gperftools/gperftools/sgidef.patch deleted file mode 100644 index b01cba39cd..0000000000 --- a/meta-oe/recipes-support/gperftools/gperftools/sgidef.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 259b420444c52463795b4b582a2ab7511149eea7 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 16 Oct 2017 21:26:40 -0700 -Subject: [PATCH] sgidef.h does not exist on musl and its not needed to compile - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Pending - ---- - src/base/linux_syscall_support.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/src/base/linux_syscall_support.h -+++ b/src/base/linux_syscall_support.h -@@ -164,7 +164,7 @@ extern "C" { - #include <endian.h> - #include <fcntl.h> - --#ifdef __mips__ -+#if defined(__mips__) && defined(__glibc__) - /* Include definitions of the ABI currently in use. */ - #include <sgidefs.h> - #endif |