mesa3d-headers: remove installation of OpenVG headers
[buildroot-gz.git] / package / webrtc-audio-processing / 0002-Proper-detection-of-cxxabi.h-and-execinfo.h.patch
bloba0332db8e78cffc300ed16bb2bf191cee31614f2
1 From b7a166acaddc4c78afa2b653e25114d9114699f3 Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Sat, 6 Aug 2016 11:24:50 +0200
4 Subject: [PATCH] Proper detection of cxxabi.h and execinfo.h
6 The current code in webrtc/base/checks.cc assumes that if __GLIBCXX__ is
7 defined and __UCLIBC__ is not defined, then both cxxabi.h and execinfo.h
8 will be available.
10 Unfortunately, this is not correct with the musl C library:
12 - It defines __GLIBCXX__
13 - It does not define __UCLIBC__ (it's not uClibc after all!)
14 - But it also doesn't provide execinfo.h
16 Therefore, in order to make things work properly, we switch to proper
17 autoconf checks for cxxabi.h and execinfo.h, and only use the backtrace
18 functionality if both are provided.
20 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
21 ---
22 configure.ac | 2 ++
23 webrtc/base/checks.cc | 4 ++--
24 2 files changed, 4 insertions(+), 2 deletions(-)
26 diff --git a/configure.ac b/configure.ac
27 index acbb3e2..ff4c752 100644
28 --- a/configure.ac
29 +++ b/configure.ac
30 @@ -45,6 +45,8 @@ AC_SUBST(GNUSTL_CFLAGS)
31 # Borrowed from gst-plugins-bad
32 AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IOS="no", [-])
34 +AC_CHECK_HEADERS([cxxabi.h execinfo.h])
36 # Based on gst-plugins-bad configure.ac and defines in
37 # <chromium source>/build/config/BUILDCONFIG.gn and
38 # webrtc/BUILD.gn
39 diff --git a/webrtc/base/checks.cc b/webrtc/base/checks.cc
40 index 49a31f2..05d23a6 100644
41 --- a/webrtc/base/checks.cc
42 +++ b/webrtc/base/checks.cc
43 @@ -16,7 +16,7 @@
44 #include <cstdio>
45 #include <cstdlib>
47 -#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
48 +#if defined(HAVE_CXX_ABI_H) && defined(HAVE_EXECINFO_H)
49 #include <cxxabi.h>
50 #include <execinfo.h>
51 #endif
52 @@ -55,7 +55,7 @@ void PrintError(const char* format, ...) {
53 // to get usable symbols on Linux. This is copied from V8. Chromium has a more
54 // advanced stace trace system; also more difficult to copy.
55 void DumpBacktrace() {
56 -#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
57 +#if defined(HAVE_CXX_ABI_H) && defined(HAVE_EXECINFO_H)
58 void* trace[100];
59 int size = backtrace(trace, sizeof(trace) / sizeof(*trace));
60 char** symbols = backtrace_symbols(trace, size);
61 --
62 2.7.4