diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-05-18 22:26:36 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-05-18 22:26:36 +0000 |
commit | cf44b366f93137a8210331a6363545b676ad5049 (patch) | |
tree | 9dac844db9f70fefe44f4e1423ca44a0bfaeab36 /cmake | |
parent | 7aae44e6903b193decd2bc6e8dd6309ff3035d06 (diff) |
Work around a glibc bug: backtrace() spuriously fails if
- glibc is dynamically linked, and
- libgcc_s is unavailable (for instance, another library is being used to
provide the compiler runtime or libgcc is statically linked), and
- the target is x86_64.
If we run backtrace() and it fails to find any stack frames, try using
_Unwind_Backtrace instead if available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269992 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rwxr-xr-x | cmake/config-ix.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index 7d5277517a9..b3f225f0740 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -144,6 +144,7 @@ endif() # function checks check_symbol_exists(arc4random "stdlib.h" HAVE_DECL_ARC4RANDOM) check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE) +check_symbol_exists(_Unwind_Backtrace "unwind.h" HAVE_UNWIND_BACKTRACE) check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE) check_symbol_exists(getrusage sys/resource.h HAVE_GETRUSAGE) check_symbol_exists(setrlimit sys/resource.h HAVE_SETRLIMIT) |