aboutsummaryrefslogtreecommitdiff
path: root/package/jack2
diff options
context:
space:
mode:
authorGravatar Samuel Martin <s.martin49@gmail.com>2016-05-17 06:10:06 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2016-05-17 15:19:57 +0200
commitb7b9426ccc9bc854e337fec8bcfdda150762bcf6 (patch)
treeada97de36024dc64c3f01077a7d8833f94176f29 /package/jack2
parent9acd598bccaab7e5edef5444abf97c840737c5b4 (diff)
downloadbuildroot-b7b9426ccc9bc854e337fec8bcfdda150762bcf6.tar.gz
buildroot-b7b9426ccc9bc854e337fec8bcfdda150762bcf6.tar.bz2
package/jack2: fix build WRT backtrace support
This change adds a patch checking for the presence of execinfo.h header and enabling the backtrace support depending on the check result. Fixes: http://autobuild.buildroot.org/results/415/415e2100dc59d35e58646c07f7cdccabecdda966/ http://autobuild.buildroot.org/results/43c/43ca1b103434ae582fdf93cb5912b311960f303b/ http://autobuild.buildroot.org/results/391/391e71a988250ea66ec4dbee6f60fdce9eaf2766/ ... Adapted from the PR: https://github.com/jackaudio/jack2/pull/206 Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/jack2')
-rw-r--r--package/jack2/0002-Make-backtrace-support-depends-on-execinfo.h-existen.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/package/jack2/0002-Make-backtrace-support-depends-on-execinfo.h-existen.patch b/package/jack2/0002-Make-backtrace-support-depends-on-execinfo.h-existen.patch
new file mode 100644
index 0000000000..719c6a83ba
--- /dev/null
+++ b/package/jack2/0002-Make-backtrace-support-depends-on-execinfo.h-existen.patch
@@ -0,0 +1,67 @@
+From 4b2c73ad056aa327dc3b505410da68cf384317ba Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Mon, 16 May 2016 22:26:05 +0200
+Subject: [PATCH] Make backtrace support depends on execinfo.h existence
+
+In some C-libraries (like uclibc), backtrace support is optional, so the
+execinfo.h file may not exist.
+
+This change adds the check for execinfo.h header and conditionnaly enable
+backtrace support.
+
+This issue has been triggered by Buildroot farms:
+ http://autobuild.buildroot.org/results/391/391e71a988250ea66ec4dbee6f60fdce9eaf2766/build-end.log
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ dbus/sigsegv.c | 8 +++++++-
+ wscript | 1 +
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/dbus/sigsegv.c b/dbus/sigsegv.c
+index ee12f91..0b31d89 100644
+--- a/dbus/sigsegv.c
++++ b/dbus/sigsegv.c
+@@ -27,7 +27,9 @@
+ #include <stdio.h>
+ #include <signal.h>
+ #include <dlfcn.h>
+-#include <execinfo.h>
++#if defined(HAVE_EXECINFO_H)
++# include <execinfo.h>
++#endif /* defined(HAVE_EXECINFO_H) */
+ #include <errno.h>
+ #ifndef NO_CPP_DEMANGLE
+ char * __cxa_demangle(const char * __mangled_name, char * __output_buffer, size_t * __length, int * __status);
+@@ -161,12 +163,16 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) {
+ bp = (void**)bp[0];
+ }
+ #else
++# if defined(HAVE_EXECINFO_H)
+ jack_error("Stack trace (non-dedicated):");
+ sz = backtrace(bt, 20);
+ strings = backtrace_symbols(bt, sz);
+
+ for(i = 0; i < sz; ++i)
+ jack_error("%s", strings[i]);
++# else /* defined(HAVE_EXECINFO_H) */
++ jack_error("Stack trace not available");
++# endif /* defined(HAVE_EXECINFO_H) */
+ #endif
+ jack_error("End of stack trace");
+ exit (-1);
+diff --git a/wscript b/wscript
+index aef4bd8..63ba3aa 100644
+--- a/wscript
++++ b/wscript
+@@ -166,6 +166,7 @@ def configure(conf):
+ if conf.env['BUILD_JACKDBUS'] != True:
+ conf.fatal('jackdbus was explicitly requested but cannot be built')
+
++ conf.check_cc(header_name='execinfo.h', define_name="HAVE_EXECINFO_H", mandatory=False)
+ conf.check_cc(header_name='samplerate.h', define_name="HAVE_SAMPLERATE")
+
+ if conf.is_defined('HAVE_SAMPLERATE'):
+--
+2.8.2
+