summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-09-02 12:02:04 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2017-09-07 10:57:37 +0200
commite70416c59b4c66eed558578f00cd22a3437888d6 (patch)
tree7a3be83b6411d2cbd47788252b1b6badc4f65bc4 /meta-oe/recipes-support
parent10c8c39c25d902ab5268fa48ac2bc0e42e65b179 (diff)
downloadmeta-openembedded-e70416c59b4c66eed558578f00cd22a3437888d6.tar.gz
gperftools: 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')
-rw-r--r--meta-oe/recipes-support/gperftools/gperftools/0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch25
-rw-r--r--meta-oe/recipes-support/gperftools/gperftools/disable_libunwind_aarch64.patch23
-rw-r--r--meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb4
3 files changed, 50 insertions, 2 deletions
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
new file mode 100644
index 000000000..99127e11a
--- /dev/null
+++ b/meta-oe/recipes-support/gperftools/gperftools/0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch
@@ -0,0 +1,25 @@
1From b5961f17e9d7f2bc44da611b3e4b27c8a641fc72 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 2 Sep 2017 08:07:17 -0700
4Subject: [PATCH] disbale heap checkers and debug allocator on musl
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Pending
9
10 configure.ac | 2 ++
11 1 file changed, 2 insertions(+)
12
13Index: git/configure.ac
14===================================================================
15--- git.orig/configure.ac
16+++ git/configure.ac
17@@ -51,6 +51,8 @@ case "$host" in
18 *-cygwin*) default_enable_heap_checker=no; default_enable_cpu_profiler=no;;
19 *-freebsd*) default_enable_heap_checker=no;;
20 *-darwin*) default_enable_heap_checker=no;;
21+ *-musl*) default_enable_heap_checker=no; default_enable_heap_profiler=no;
22+ default_enable_debugalloc=no; default_enable_libunwind=no;
23 esac
24
25 # Currently only backtrace works on s390.
diff --git a/meta-oe/recipes-support/gperftools/gperftools/disable_libunwind_aarch64.patch b/meta-oe/recipes-support/gperftools/gperftools/disable_libunwind_aarch64.patch
new file mode 100644
index 000000000..f2647404b
--- /dev/null
+++ b/meta-oe/recipes-support/gperftools/gperftools/disable_libunwind_aarch64.patch
@@ -0,0 +1,23 @@
1Disable libunwind on aarch64
2
3Fixes hangs when using libtcmalloc.so
4
5Upstream-Status: Pending
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7
8Index: git/configure.ac
9===================================================================
10--- git.orig/configure.ac
11+++ git/configure.ac
12@@ -69,6 +69,11 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [re
13 [default_enable_libunwind=yes
14 default_tcmalloc_pagesize=8])
15
16+# Disable libunwind linking on aarch64 by default.
17+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [return __aarch64__])],
18+ [default_enable_libunwind=no],
19+ [default_enable_libunwind=yes])
20+
21 AC_ARG_ENABLE([cpu-profiler],
22 [AS_HELP_STRING([--disable-cpu-profiler],
23 [do not build the cpu profiler])],
diff --git a/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb b/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb
index ece9dd9e8..23284670b 100644
--- a/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb
+++ b/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb
@@ -10,6 +10,8 @@ SRC_URI = "git://github.com/gperftools/gperftools \
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 \ 11 file://0001-fix-build-with-musl-libc.patch \
12 file://0001-include-fcntl.h-for-loff_t-definition.patch \ 12 file://0001-include-fcntl.h-for-loff_t-definition.patch \
13 file://0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch \
14 file://disable_libunwind_aarch64.patch \
13 " 15 "
14 16
15inherit autotools 17inherit autotools
@@ -20,8 +22,6 @@ S = "${WORKDIR}/git"
20# do_page_fault(): sending SIGSEGV to ls for invalid read access from 00000008 22# do_page_fault(): sending SIGSEGV to ls for invalid read access from 00000008
21# Segmentation fault (core dumped) 23# Segmentation fault (core dumped)
22COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|arm|aarch64).*-linux*" 24COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|arm|aarch64).*-linux*"
23# On aarch64, add this option to avoid system hanging when using libtcmalloc.so.
24EXTRA_OECONF_aarch64 += "--disable-libunwind"
25# Disable thumb1 25# Disable thumb1
26# {standard input}: Assembler messages: 26# {standard input}: Assembler messages:
27# {standard input}:434: Error: lo register required -- `ldr pc,[sp]' 27# {standard input}:434: Error: lo register required -- `ldr pc,[sp]'