diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-oe/recipes-support/gperftools | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-support/gperftools')
8 files changed, 258 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-Support-Atomic-ops-on-clang.patch b/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-Support-Atomic-ops-on-clang.patch new file mode 100644 index 0000000000..2fd21c2783 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-Support-Atomic-ops-on-clang.patch @@ -0,0 +1,31 @@ +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-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-Use-ucontext_t-instead-of-struct-ucontext.patch b/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-Use-ucontext_t-instead-of-struct-ucontext.patch new file mode 100644 index 0000000000..b3033621b5 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-Use-ucontext_t-instead-of-struct-ucontext.patch @@ -0,0 +1,34 @@ +From 230cd84486145c5bb1d69d4c9a544e00adbcc9b5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 1 Jul 2017 13:21:21 -0700 +Subject: [PATCH] Use ucontext_t instead of struct ucontext + +Newer glibc has dropped the ucontext tag from exposing + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + src/stacktrace_powerpc-linux-inl.h | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/stacktrace_powerpc-linux-inl.h b/src/stacktrace_powerpc-linux-inl.h +index 3b3843b..a301a46 100644 +--- a/src/stacktrace_powerpc-linux-inl.h ++++ b/src/stacktrace_powerpc-linux-inl.h +@@ -53,7 +53,6 @@ + #elif defined(HAVE_UCONTEXT_H) + #include <ucontext.h> // for ucontext_t + #endif +-typedef ucontext ucontext_t; + + // PowerPC64 Little Endian follows BE wrt. backchain, condition register, + // and LR save area, so no need to adjust the reading struct. +@@ -202,7 +201,7 @@ static int GET_STACK_TRACE_OR_FRAMES { + struct rt_signal_frame_32 { + char dummy[64 + 16]; + siginfo_t info; +- struct ucontext uc; ++ ucontext_t uc; + // We don't care about the rest, since IP value is at 'uc' field.A + } *sigframe = reinterpret_cast<rt_signal_frame_32*>(current); + result[n] = (void*) sigframe->uc.uc_mcontext.uc_regs->gregs[PT_NIP]; diff --git a/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch b/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch new file mode 100644 index 0000000000..ab3ceb964f --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch @@ -0,0 +1,26 @@ +From 06605158852f9364519391fa11070ba5ec4303e9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 2 Sep 2017 08:07:17 -0700 +Subject: [PATCH] disbale heap checkers and debug allocator on musl + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Upstream-Status: Pending + +--- + configure.ac | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 70b49a3..8154c5c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -51,6 +51,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;; ++ *-musl*) default_enable_heap_checker=no; default_enable_heap_profiler=no; ++ default_enable_debugalloc=no; default_enable_libunwind=no; + esac + + # Currently only backtrace works on s390. diff --git a/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch b/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch new file mode 100644 index 0000000000..0a72ff27c8 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch @@ -0,0 +1,59 @@ +From 034e7da08c3fbffcba8cf8d4e24a71a16558db5a 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> + +--- + configure.ac | 1 + + src/malloc_hook_mmap_linux.h | 8 ++++++-- + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index b42fea3..70b49a3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -188,6 +188,7 @@ AC_HEADER_STDC + AC_CHECK_TYPES([__int64]) # defined in some windows platforms + AC_CHECK_TYPES([struct mallinfo],,, [#include <malloc.h>]) + AC_CHECK_TYPES([Elf32_Versym],,, [#include <elf.h>]) # for vdso_support.h ++AC_CHECK_FUNCS(__sbrk) # for intercepting glibc memory allocator + AC_CHECK_FUNCS(sbrk) # for tcmalloc to get memory + AC_CHECK_FUNCS(geteuid) # for turning off services when run as root + AC_CHECK_FUNCS(fork) # for the pthread_atfork setup +diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h +index 79ac4e3..d444635 100755 +--- a/src/malloc_hook_mmap_linux.h ++++ b/src/malloc_hook_mmap_linux.h +@@ -46,6 +46,10 @@ + #include <errno.h> + #include "base/linux_syscall_support.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(). +@@ -168,7 +172,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, + 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 { +@@ -206,7 +210,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, + return result; + } + +-#ifndef __UCLIBC__ ++#if HAVE___SBRK + // libc's version: + extern "C" void* __sbrk(ptrdiff_t increment); + diff --git a/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-include-fcntl.h-for-loff_t-definition.patch b/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-include-fcntl.h-for-loff_t-definition.patch new file mode 100644 index 0000000000..4c63e73b3c --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/0001-include-fcntl.h-for-loff_t-definition.patch @@ -0,0 +1,26 @@ +From a16a73f0819d26219ee83cd98eea82786d7c1755 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 16 Jul 2017 19:28:17 -0700 +Subject: [PATCH] include fcntl.h for loff_t definition + +Fixes +linux_syscall_support.h:2641:26: error: 'loff_t' has not been declared + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + src/base/linux_syscall_support.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h +index 85347a2..70431ca 100644 +--- a/src/base/linux_syscall_support.h ++++ b/src/base/linux_syscall_support.h +@@ -162,6 +162,7 @@ extern "C" { + #include <unistd.h> + #include <linux/unistd.h> + #include <endian.h> ++#include <fcntl.h> + + #ifdef __mips__ + /* Include definitions of the ABI currently in use. */ diff --git a/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/disable_libunwind_aarch64.patch b/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/disable_libunwind_aarch64.patch new file mode 100644 index 0000000000..c3c5784186 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/disable_libunwind_aarch64.patch @@ -0,0 +1,30 @@ +From 564f800e3e24647c095f7a321bf3ebdccfbf762d Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 2 Sep 2017 12:02:04 -0700 +Subject: [PATCH] Disable libunwind on aarch64 + +Fixes hangs when using libtcmalloc.so + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + configure.ac | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 8154c5c..063b260 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -69,6 +69,11 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [return __PPC64__])], + [default_enable_libunwind=yes + default_tcmalloc_pagesize=8]) + ++# Disable libunwind linking on aarch64 by default. ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [return __aarch64__])], ++ [default_enable_libunwind=no], ++ [default_enable_libunwind=yes]) ++ + AC_ARG_ENABLE([cpu-profiler], + [AS_HELP_STRING([--disable-cpu-profiler], + [do not build the cpu profiler])], diff --git a/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/sgidef.patch b/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/sgidef.patch new file mode 100644 index 0000000000..10274a6dec --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools/sgidef.patch @@ -0,0 +1,25 @@ +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(-) + +diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h +index 70431ca..b23ca59 100644 +--- 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 diff --git a/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb b/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb new file mode 100644 index 0000000000..ecac6c5cc8 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb @@ -0,0 +1,27 @@ +SUMMARY = "Fast, multi-threaded malloc() and nifty performance analysis tools" +HOMEPAGE = "https://github.com/gperftools/gperftools" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=762732742c73dc6c7fbe8632f06c059a" +DEPENDS += "libunwind" + +SRCREV = "bf840dec0495e17f5c8403e68e10b9d6bf05c559" +SRC_URI = "git://github.com/gperftools/gperftools \ + file://0001-Support-Atomic-ops-on-clang.patch \ + file://0001-Use-ucontext_t-instead-of-struct-ucontext.patch \ + file://0001-fix-build-with-musl-libc.patch \ + file://0001-include-fcntl.h-for-loff_t-definition.patch \ + file://0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch \ + file://disable_libunwind_aarch64.patch \ + file://sgidef.patch \ + " + +inherit autotools + +S = "${WORKDIR}/git" + +# Disable thumb1 +# {standard input}: Assembler messages: +# {standard input}:434: Error: lo register required -- `ldr pc,[sp]' +# Makefile:4538: recipe for target 'src/base/libtcmalloc_la-linuxthreads.lo' failed +ARM_INSTRUCTION_SET_armv5 = "arm" + |