From 0417338bbbe28377a5c20e1b0d38dc802ea06b2b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 29 Oct 2019 15:04:30 +0200 Subject: Only enable backtrace support on Linux if using glibc Other libc implementations, for example musl, don't support this out of the box. --- libbutl/backtrace.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libbutl/backtrace.cxx') diff --git a/libbutl/backtrace.cxx b/libbutl/backtrace.cxx index 7a8d615..a66faa2 100644 --- a/libbutl/backtrace.cxx +++ b/libbutl/backtrace.cxx @@ -12,14 +12,17 @@ // With glibc linking with -rdynamic gives (non-static) function names. // FreeBSD requires explicitly linking -lexecinfo. // +// Note that some libc implementation on Linux (most notably, musl), don't +// support this, at least not out of the box. +// #ifndef BUILD2_BOOTSTRAP -# if defined(__linux__) || \ +# if defined(__GLIBC__) || \ defined(__APPLE__) || \ defined(__FreeBSD__) # define LIBBUTL_BACKTRACE # endif #else -# if defined(__linux__) || \ +# if defined(__GLIBC__) || \ defined(__APPLE__) # define LIBBUTL_BACKTRACE # endif -- cgit v1.1