From b1e6ac3c66ade56de004de3bafeb9e2cc903d10a Mon Sep 17 00:00:00 2001 From: Taiju Yamada Date: Fri, 15 Nov 2024 01:16:24 +0900 Subject: [PATCH] Assume pthread on MinGW Signed-off-by: Taiju Yamada --- make.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/make.inc b/make.inc index a961e91..f30dd6c 100644 --- a/make.inc +++ b/make.inc @@ -201,8 +201,12 @@ ASFLAGS += -DAS_FEATURE_LEVEL=$(as_feature_level) $(D_HAVE_AS_KNOWS_AVX512_y) # Check for pthreads -have_threads ?= $(shell printf "int main(void){return 0;}\n" | $(CC) -x c - -o /dev/null -lpthread && echo y ) -THREAD_LD_$(have_threads) := -lpthread +ifeq ($(arch),mingw) +have_threads ?= y +else +have_threads ?= $(shell printf "int main(void){return 0;}\n" | $(CC) -x c - -o /dev/null -pthread && echo y ) +endif +THREAD_LD_$(have_threads) := -pthread THREAD_CFLAGS_$(have_threads) := -DHAVE_THREADS progs: $(bin_PROGRAMS)