Assume pthread on MinGW

Signed-off-by: Taiju Yamada <tyamada@bi.a.u-tokyo.ac.jp>
This commit is contained in:
Taiju Yamada 2024-11-15 01:16:24 +09:00 committed by Pablo de Lara
parent bd1ce56c43
commit b1e6ac3c66

View File

@ -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)