diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-10-29 15:04:30 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-10-29 15:04:30 +0200 |
commit | 0417338bbbe28377a5c20e1b0d38dc802ea06b2b (patch) | |
tree | e3cb305b4fae81843c8e9df7e6fbce632923cb73 /libbutl/backtrace.cxx | |
parent | 5ea81f5bc791243ac77e82276a8a5a3faa3e155f (diff) |
Only enable backtrace support on Linux if using glibc
Other libc implementations, for example musl, don't support this out of the
box.
Diffstat (limited to 'libbutl/backtrace.cxx')
-rw-r--r-- | libbutl/backtrace.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
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 |