diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-07-22 09:50:42 -0700 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-08-13 13:16:18 +0200 |
commit | 3ec1e79aa06341df462aefad05fccb048c79d8cc (patch) | |
tree | 03db0121a14603fc5f21a1b88a2c3b538f906ee0 /meta-oe/recipes-support/gperftools | |
parent | 8e2393a92b3461de5bfb552aabb2eaca108d3659 (diff) | |
download | meta-openembedded-3ec1e79aa06341df462aefad05fccb048c79d8cc.tar.gz |
gperftools: Upgrade to 2.6.1
Fix build with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/gperftools')
-rw-r--r-- | meta-oe/recipes-support/gperftools/gperftools/0001-Fix-build-failure-for-ppc.patch | 28 | ||||
-rw-r--r-- | meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch | 61 | ||||
-rw-r--r-- | meta-oe/recipes-support/gperftools/gperftools/0001-include-fcntl.h-for-loff_t-definition.patch | 28 | ||||
-rw-r--r-- | meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb (renamed from meta-oe/recipes-support/gperftools/gperftools_2.5.bb) | 19 |
4 files changed, 102 insertions, 34 deletions
diff --git a/meta-oe/recipes-support/gperftools/gperftools/0001-Fix-build-failure-for-ppc.patch b/meta-oe/recipes-support/gperftools/gperftools/0001-Fix-build-failure-for-ppc.patch deleted file mode 100644 index 27f855d1e..000000000 --- a/meta-oe/recipes-support/gperftools/gperftools/0001-Fix-build-failure-for-ppc.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | Subject: Fix build failure for ppc | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Fix the following build failure. | ||
6 | |||
7 | error: 'siginfo_t' does not name a type | ||
8 | |||
9 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
10 | --- | ||
11 | src/stacktrace_powerpc-linux-inl.h | 1 + | ||
12 | 1 file changed, 1 insertion(+) | ||
13 | |||
14 | diff --git a/src/stacktrace_powerpc-linux-inl.h b/src/stacktrace_powerpc-linux-inl.h | ||
15 | index 5d16fa1..a9bf775 100644 | ||
16 | --- a/src/stacktrace_powerpc-linux-inl.h | ||
17 | +++ b/src/stacktrace_powerpc-linux-inl.h | ||
18 | @@ -44,6 +44,7 @@ | ||
19 | |||
20 | #include <stdint.h> // for uintptr_t | ||
21 | #include <stdlib.h> // for NULL | ||
22 | +#include <signal.h> // for siginfo_t | ||
23 | #include <gperftools/stacktrace.h> | ||
24 | #include <base/vdso_support.h> | ||
25 | |||
26 | -- | ||
27 | 2.8.3 | ||
28 | |||
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 new file mode 100644 index 000000000..78621c7fe --- /dev/null +++ b/meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | From 157914941bd38f1a38bb6bd7294ca6c2bc1b8dcb Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 16 Jul 2017 15:51:28 -0700 | ||
4 | Subject: [PATCH] fix build with musl libc | ||
5 | |||
6 | Patch from https://github.com/gperftools/gperftools/pull/765/ | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | configure.ac | 1 + | ||
11 | src/malloc_hook_mmap_linux.h | 8 ++++++-- | ||
12 | 2 files changed, 7 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/configure.ac b/configure.ac | ||
15 | index b42fea3..70b49a3 100644 | ||
16 | --- a/configure.ac | ||
17 | +++ b/configure.ac | ||
18 | @@ -188,6 +188,7 @@ AC_HEADER_STDC | ||
19 | AC_CHECK_TYPES([__int64]) # defined in some windows platforms | ||
20 | AC_CHECK_TYPES([struct mallinfo],,, [#include <malloc.h>]) | ||
21 | AC_CHECK_TYPES([Elf32_Versym],,, [#include <elf.h>]) # for vdso_support.h | ||
22 | +AC_CHECK_FUNCS(__sbrk) # for intercepting glibc memory allocator | ||
23 | AC_CHECK_FUNCS(sbrk) # for tcmalloc to get memory | ||
24 | AC_CHECK_FUNCS(geteuid) # for turning off services when run as root | ||
25 | AC_CHECK_FUNCS(fork) # for the pthread_atfork setup | ||
26 | diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h | ||
27 | index 79ac4e3..d444635 100755 | ||
28 | --- a/src/malloc_hook_mmap_linux.h | ||
29 | +++ b/src/malloc_hook_mmap_linux.h | ||
30 | @@ -46,6 +46,10 @@ | ||
31 | #include <errno.h> | ||
32 | #include "base/linux_syscall_support.h" | ||
33 | |||
34 | +#ifndef __GLIBC__ | ||
35 | +typedef off64_t __off64_t; | ||
36 | +#endif | ||
37 | + | ||
38 | // The x86-32 case and the x86-64 case differ: | ||
39 | // 32b has a mmap2() syscall, 64b does not. | ||
40 | // 64b and 32b have different calling conventions for mmap(). | ||
41 | @@ -168,7 +172,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, | ||
42 | return result; | ||
43 | } | ||
44 | |||
45 | -# if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) | ||
46 | +# if defined(__GLIBC__) && (!defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH)) | ||
47 | |||
48 | extern "C" void* mmap(void *start, size_t length, int prot, int flags, | ||
49 | int fd, off_t offset) __THROW { | ||
50 | @@ -206,7 +210,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, | ||
51 | return result; | ||
52 | } | ||
53 | |||
54 | -#ifndef __UCLIBC__ | ||
55 | +#if HAVE___SBRK | ||
56 | // libc's version: | ||
57 | extern "C" void* __sbrk(ptrdiff_t increment); | ||
58 | |||
59 | -- | ||
60 | 2.13.3 | ||
61 | |||
diff --git a/meta-oe/recipes-support/gperftools/gperftools/0001-include-fcntl.h-for-loff_t-definition.patch b/meta-oe/recipes-support/gperftools/gperftools/0001-include-fcntl.h-for-loff_t-definition.patch new file mode 100644 index 000000000..667008a5b --- /dev/null +++ b/meta-oe/recipes-support/gperftools/gperftools/0001-include-fcntl.h-for-loff_t-definition.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 04ea8e001501931f4dbf20288aca78469617b08a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 16 Jul 2017 19:28:17 -0700 | ||
4 | Subject: [PATCH] include fcntl.h for loff_t definition | ||
5 | |||
6 | Fixes | ||
7 | linux_syscall_support.h:2641:26: error: 'loff_t' has not been declared | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | src/base/linux_syscall_support.h | 1 + | ||
12 | 1 file changed, 1 insertion(+) | ||
13 | |||
14 | diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h | ||
15 | index 85347a2..70431ca 100644 | ||
16 | --- a/src/base/linux_syscall_support.h | ||
17 | +++ b/src/base/linux_syscall_support.h | ||
18 | @@ -162,6 +162,7 @@ extern "C" { | ||
19 | #include <unistd.h> | ||
20 | #include <linux/unistd.h> | ||
21 | #include <endian.h> | ||
22 | +#include <fcntl.h> | ||
23 | |||
24 | #ifdef __mips__ | ||
25 | /* Include definitions of the ABI currently in use. */ | ||
26 | -- | ||
27 | 2.13.3 | ||
28 | |||
diff --git a/meta-oe/recipes-support/gperftools/gperftools_2.5.bb b/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb index 43780a5ee..6c29a6127 100644 --- a/meta-oe/recipes-support/gperftools/gperftools_2.5.bb +++ b/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb | |||
@@ -2,22 +2,29 @@ SUMMARY = "Fast, multi-threaded malloc() and nifty performance analysis tools" | |||
2 | HOMEPAGE = "http://code.google.com/p/gperftools/" | 2 | HOMEPAGE = "http://code.google.com/p/gperftools/" |
3 | LICENSE = "BSD" | 3 | LICENSE = "BSD" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=762732742c73dc6c7fbe8632f06c059a" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=762732742c73dc6c7fbe8632f06c059a" |
5 | DEPENDS = "libunwind" | 5 | DEPENDS += "libunwind" |
6 | 6 | ||
7 | SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/gperftools/gperftools-2.5.tar.gz/aa1eaf95dbe2c9828d0bd3a00f770f50/gperftools-2.5.tar.gz \ | 7 | SRCREV = "bf840dec0495e17f5c8403e68e10b9d6bf05c559" |
8 | SRC_URI = "git://github.com/gperftools/gperftools \ | ||
8 | file://0001-Support-Atomic-ops-on-clang.patch \ | 9 | file://0001-Support-Atomic-ops-on-clang.patch \ |
9 | file://0001-Fix-build-failure-for-ppc.patch \ | ||
10 | file://0001-Use-ucontext_t-instead-of-struct-ucontext.patch \ | 10 | file://0001-Use-ucontext_t-instead-of-struct-ucontext.patch \ |
11 | file://0001-fix-build-with-musl-libc.patch \ | ||
12 | file://0001-include-fcntl.h-for-loff_t-definition.patch \ | ||
11 | " | 13 | " |
12 | 14 | ||
13 | SRC_URI[md5sum] = "aa1eaf95dbe2c9828d0bd3a00f770f50" | ||
14 | SRC_URI[sha256sum] = "6fa2748f1acdf44d750253e160cf6e2e72571329b42e563b455bde09e9e85173" | ||
15 | |||
16 | inherit autotools | 15 | inherit autotools |
17 | 16 | ||
17 | S = "${WORKDIR}/git" | ||
18 | |||
18 | # On mips, we have the following error. | 19 | # On mips, we have the following error. |
19 | # do_page_fault(): sending SIGSEGV to ls for invalid read access from 00000008 | 20 | # do_page_fault(): sending SIGSEGV to ls for invalid read access from 00000008 |
20 | # Segmentation fault (core dumped) | 21 | # Segmentation fault (core dumped) |
21 | COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|arm|aarch64).*-linux*" | 22 | COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|arm|aarch64).*-linux*" |
22 | # On aarch64, add this option to avoid system hanging when using libtcmalloc.so. | 23 | # On aarch64, add this option to avoid system hanging when using libtcmalloc.so. |
23 | EXTRA_OECONF_aarch64 += "--disable-libunwind" | 24 | EXTRA_OECONF_aarch64 += "--disable-libunwind" |
25 | # Disable thumb1 | ||
26 | # {standard input}: Assembler messages: | ||
27 | # {standard input}:434: Error: lo register required -- `ldr pc,[sp]' | ||
28 | # Makefile:4538: recipe for target 'src/base/libtcmalloc_la-linuxthreads.lo' failed | ||
29 | ARM_INSTRUCTION_SET_armv5 = "arm" | ||
30 | |||