diff options
| -rw-r--r-- | meta-oe/recipes-support/gperftools/gperftools/0001-fix-build-with-musl-libc.patch | 34 | ||||
| -rw-r--r-- | meta-oe/recipes-support/gperftools/gperftools_2.7.90.bb (renamed from meta-oe/recipes-support/gperftools/gperftools_2.7.bb) | 2 |
2 files changed, 8 insertions, 28 deletions
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 index 49d5c21676..cb4ead3176 100644 --- 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 | |||
| @@ -6,26 +6,12 @@ Subject: [PATCH] fix build with musl libc | |||
| 6 | Patch from https://github.com/gperftools/gperftools/pull/765/ | 6 | Patch from https://github.com/gperftools/gperftools/pull/765/ |
| 7 | 7 | ||
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 9 | |||
| 10 | --- | 9 | --- |
| 11 | configure.ac | 1 + | 10 | src/malloc_hook_mmap_linux.h | 6 +++++- |
| 12 | src/malloc_hook_mmap_linux.h | 8 ++++++-- | 11 | 1 file changed, 5 insertions(+), 1 deletion(-) |
| 13 | 2 files changed, 7 insertions(+), 2 deletions(-) | ||
| 14 | 12 | ||
| 15 | diff --git a/configure.ac b/configure.ac | ||
| 16 | index 497103e..f9efc3e 100644 | ||
| 17 | --- a/configure.ac | ||
| 18 | +++ b/configure.ac | ||
| 19 | @@ -188,6 +188,7 @@ AC_HEADER_STDC | ||
| 20 | AC_CHECK_TYPES([__int64]) # defined in some windows platforms | ||
| 21 | AC_CHECK_TYPES([struct mallinfo],,, [#include <malloc.h>]) | ||
| 22 | AC_CHECK_TYPES([Elf32_Versym],,, [#include <elf.h>]) # for vdso_support.h | ||
| 23 | +AC_CHECK_FUNCS(__sbrk) # for intercepting glibc memory allocator | ||
| 24 | AC_CHECK_FUNCS(sbrk) # for tcmalloc to get memory | ||
| 25 | AC_CHECK_FUNCS(geteuid) # for turning off services when run as root | ||
| 26 | AC_CHECK_FUNCS(fork) # for the pthread_atfork setup | ||
| 27 | diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h | 13 | diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h |
| 28 | index 2f6116f..0605855 100755 | 14 | index e2efb05..66b3110 100644 |
| 29 | --- a/src/malloc_hook_mmap_linux.h | 15 | --- a/src/malloc_hook_mmap_linux.h |
| 30 | +++ b/src/malloc_hook_mmap_linux.h | 16 | +++ b/src/malloc_hook_mmap_linux.h |
| 31 | @@ -46,6 +46,10 @@ | 17 | @@ -46,6 +46,10 @@ |
| @@ -39,7 +25,7 @@ index 2f6116f..0605855 100755 | |||
| 39 | // The x86-32 case and the x86-64 case differ: | 25 | // The x86-32 case and the x86-64 case differ: |
| 40 | // 32b has a mmap2() syscall, 64b does not. | 26 | // 32b has a mmap2() syscall, 64b does not. |
| 41 | // 64b and 32b have different calling conventions for mmap(). | 27 | // 64b and 32b have different calling conventions for mmap(). |
| 42 | @@ -168,7 +172,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, | 28 | @@ -175,7 +179,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, |
| 43 | return result; | 29 | return result; |
| 44 | } | 30 | } |
| 45 | 31 | ||
| @@ -48,12 +34,6 @@ index 2f6116f..0605855 100755 | |||
| 48 | 34 | ||
| 49 | extern "C" void* mmap(void *start, size_t length, int prot, int flags, | 35 | extern "C" void* mmap(void *start, size_t length, int prot, int flags, |
| 50 | int fd, off_t offset) __THROW { | 36 | int fd, off_t offset) __THROW { |
| 51 | @@ -206,7 +210,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, | 37 | -- |
| 52 | return result; | 38 | 2.17.1 |
| 53 | } | 39 | |
| 54 | |||
| 55 | -#ifndef __UCLIBC__ | ||
| 56 | +#if HAVE___SBRK | ||
| 57 | // libc's version: | ||
| 58 | extern "C" void* __sbrk(intptr_t increment); | ||
| 59 | |||
diff --git a/meta-oe/recipes-support/gperftools/gperftools_2.7.bb b/meta-oe/recipes-support/gperftools/gperftools_2.7.90.bb index ee34acec24..9dfb0d974f 100644 --- a/meta-oe/recipes-support/gperftools/gperftools_2.7.bb +++ b/meta-oe/recipes-support/gperftools/gperftools_2.7.90.bb | |||
| @@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/gperftools/gperftools" | |||
| 3 | LICENSE = "BSD-3-Clause" | 3 | LICENSE = "BSD-3-Clause" |
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=762732742c73dc6c7fbe8632f06c059a" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=762732742c73dc6c7fbe8632f06c059a" |
| 5 | 5 | ||
| 6 | SRCREV = "9608fa3bcf8020d35f59fbf70cd3cbe4b015b972" | 6 | SRCREV = "db7aa547abb5abdd558587a15502584cbc825438" |
| 7 | SRC_URI = "git://github.com/gperftools/gperftools \ | 7 | SRC_URI = "git://github.com/gperftools/gperftools \ |
| 8 | file://0001-Support-Atomic-ops-on-clang.patch \ | 8 | file://0001-Support-Atomic-ops-on-clang.patch \ |
| 9 | file://0001-fix-build-with-musl-libc.patch \ | 9 | file://0001-fix-build-with-musl-libc.patch \ |
