From 4cf7dd0a7502849b117e15ad5eb1eb68eab4b6dc Mon Sep 17 00:00:00 2001 From: Aliaksey Kandratsenka Date: Sun, 14 Feb 2021 22:28:34 -0800 Subject: enable emergency_malloc on all architectures with mmap It is actually needed for libgcc backtracer from time to time. And we've seen libunwind to need it too. Plus we've not heard of any problems with it. So lets just always enable it. This should fix github issue #1248. --- configure.ac | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 11eeb4d..b72b331 100644 --- a/configure.ac +++ b/configure.ac @@ -244,8 +244,9 @@ fi # aren't using autoconf. So we keep HAVE_MMAP define, but only to # distingush windows and rest. case "$host" in - *-mingw*) ;; - *) AC_DEFINE(HAVE_MMAP, 1, [Define to 1 if you have a working `mmap' system call.]) + *-mingw*) default_emergency_malloc=no;; + *) default_emergency_malloc=yes + AC_DEFINE(HAVE_MMAP, 1, [Define to 1 if you have a working `mmap' system call.]) esac # If AtomicWord != Atomic32, we need to define two versions of all the @@ -423,10 +424,6 @@ AC_CACHE_CHECK([if target has _Unwind_Backtrace], AS_IF([test "x$perftools_cv_have_unwind_backtrace" = xyes], [AC_DEFINE(HAVE_UNWIND_BACKTRACE, 1, [Whether contains _Unwind_Backtrace])]) -AS_IF([test "x$enable_backtrace" = xyes], - [default_emergency_malloc=yes], - [default_emergency_malloc=no]) - AS_IF([test "x$will_use_libunwind" = xyes], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [return __arm__])], [default_emergency_malloc=yes])]) -- cgit v1.2.1