From 063d134aeb4807872f45a3b7e6b43bed8f6320a2 Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Mon, 14 Feb 2022 17:30:11 -0800 Subject: [PATCH] Properly detect background thread support on Darwin. When cross-compile, the host type / abi should be checked to determine background thread compatibility. --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0661005d..abcd91d2 100644 --- a/configure.ac +++ b/configure.ac @@ -2394,7 +2394,8 @@ fi dnl ============================================================================ dnl Enable background threads if possible. -if test "x${have_pthread}" = "x1" -a "x${je_cv_os_unfair_lock}" != "xyes" ; then +if test "x${have_pthread}" = "x1" -a "x${je_cv_os_unfair_lock}" != "xyes" -a \ + "x${abi}" != "xmacho" ; then AC_DEFINE([JEMALLOC_BACKGROUND_THREAD], [ ], [ ]) fi