In particular, this is not implemented on armhf.
#endif()
# Checks for header libraries functions.
-CHECK_LIBRARY_EXISTS(execinfo backtrace "" HAVE_BACKTRACE_IN_LIBEXECINFO)
+CHECK_LIBRARY_EXISTS(execinfo backtrace "" HAVE_BACKTRACE)
CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_POSIX_GETTIME)
CHECK_LIBRARY_EXISTS(pthread pthread_create "" HAVE_PTHREAD)
# So we include only where needed, and compile with -Wundef to notice the missing includes.
# But cmake sometimes defines to the empty definition (#define HAVE_VALGRIND_H).
# So we have to make sure that everything got a decent value before generating the files.
-foreach(var HAVE_EXECINFO_H HAVE_FUTEX_H HAVE_GETDTABLESIZE HAVE_GETTIMEOFDAY HAVE_MMAP HAVE_NANOSLEEP HAVE_POPEN
+foreach(var HAVE_BACKTRACE HAVE_EXECINFO_H HAVE_FUTEX_H HAVE_GETDTABLESIZE HAVE_GETTIMEOFDAY HAVE_MMAP HAVE_NANOSLEEP HAVE_POPEN
HAVE_POSIX_GETTIME HAVE_PROCESS_VM_READV HAVE_SIGNAL_H HAVE_SYS_PARAM_H HAVE_SYS_SYSCTL_H HAVE_SYSCONF
HAVE_UCONTEXT_H HAVE_UNISTD_H HAVE_VALGRIND_H HAVE_VASPRINTF)
if(${var})
#include "simgrid/simix.h" /* SIMIX_process_self_get_name() */
-#undef HAVE_BACKTRACE
-#if HAVE_EXECINFO_H && HAVE_POPEN && defined(ADDR2LINE)
-# define HAVE_BACKTRACE 1 /* Hello linux box */
-#endif
-
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_ex, xbt, "Exception mecanism");
XBT_EXPORT_NO_IMPORT(const xbt_running_ctx_t) __xbt_ex_ctx_initializer = XBT_RUNNING_CTX_INITIALIZER;
xbt_backtrace_display(&e);
}
-#if HAVE_EXECINFO_H && HAVE_POPEN && defined(ADDR2LINE)
+#if HAVE_BACKTRACE && HAVE_EXECINFO_H && HAVE_POPEN && defined(ADDR2LINE)
# include "src/xbt/backtrace_linux.c"
#else
# include "src/xbt/backtrace_dummy.c"
break;
case 'b': /* backtrace; called %throwable in LOG4J */
case 'B': /* short backtrace; called %throwable{short} in LOG4J */
-#if HAVE_EXECINFO_H && HAVE_POPEN && defined(ADDR2LINE)
+#if HAVE_BACKTRACE && HAVE_EXECINFO_H && HAVE_POPEN && defined(ADDR2LINE)
{
xbt_ex_t e;
SET(SIMGRID_DEP "${SIMGRID_DEP} -lrt")
endif()
-if(HAVE_BACKTRACE_IN_LIBEXECINFO)
+if(HAVE_BACKTRACE)
SET(SIMGRID_DEP "${SIMGRID_DEP} -lexecinfo")
-endif(HAVE_BACKTRACE_IN_LIBEXECINFO)
+endif()
# Compute the dependencies of SMPI
##################################
#define HAVE_PRIVATIZATION @HAVE_PRIVATIZATION@ /* We have mmap and objdump to handle privatization */
/* Other function checks */
+#define HAVE_BACKTRACE @HAVE_BACKTRACE@ /* Function backtrace */
#define HAVE_MMAP @HAVE_MMAP@ /* Function mmap */
#define HAVE_SEM_INIT @HAVE_SEM_INIT@ /* Function sem_init (part of XPG6 standard only) */
#define HAVE_POPEN @HAVE_POPEN@ /* Function popen */