Otherwise the LLVM CMake configure step does not detect that backtrace()
is available:
/local/scratch/alr48/cheri/output/sdk/sysroot128/usr/include/execinfo.h:37:1: error: unknown type name 'BEGIN_
DECLS'
BEGIN_DECLS
^
/local/scratch/alr48/cheri/output/sdk/sysroot128/usr/include/execinfo.h:38:7: error: expected ';' after top leve
l declarator
size_t backtrace(void **, size_t);
^
/local/scratch/alr48/cheri/output/sdk/sysroot128/usr/include/execinfo.h:43:1: error: unknown type name 'END_DECLS'
END_DECLS
^
CheckSymbolExists.c:8:19: error: use of undeclared identifier 'backtrace'
return ((int*)(&backtrace))[argc]; ^
4 errors generated.
ninja: build stopped: subcommand failed.
File /local/scratch/alr48/cheri/build/llvm-project-mips-hybrid128-build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <execinfo.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef backtrace
return ((int*)(&backtrace))[argc];
#else
(void)argc; return 0;
#endif
}