package/asterisk: enable backtrace when available
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 9 Sep 2017 21:39:08 +0000 (23:39 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sat, 23 Sep 2017 17:20:18 +0000 (19:20 +0200)
asterisk uses backtrace() from execinfo.h to print beuatiful backtraces
when it fails. But execinfo is only reliably available with glibc, while
it is optionbal in uClibc and completely missing in musl.

So, only enable backtrace support for glibc toolchains.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/asterisk/asterisk.mk

index 7016c9f3a4e06b7146ac226547b3f33759b2d5e3..65f80626be1054d930efef9c07d3b791693494ef 100644 (file)
@@ -50,7 +50,6 @@ ASTERISK_CONF_OPTS = \
        --disable-rpath \
        --without-asound \
        --without-bfd \
-       --without-execinfo \
        --without-bluetooth \
        --without-cap \
        --without-cpg \
@@ -135,6 +134,12 @@ ASTERISK_CONF_OPTS += --without-avcodec
 ASTERISK_CONF_ENV = \
        ac_cv_path_CONFIG_LIBXML2=$(STAGING_DIR)/usr/bin/xml2-config
 
+ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
+ASTERISK_CONF_OPTS += --with-execinfo
+else
+ASTERISK_CONF_OPTS += --without-execinfo
+endif
+
 ASTERISK_DIRS = \
        ASTVARLIBDIR="/usr/lib/asterisk" \
        ASTDATADIR="/usr/lib/asterisk" \