Skip to content

Commit

Permalink
Assume pthread on MinGW
Browse files Browse the repository at this point in the history
Signed-off-by: Taiju Yamada <[email protected]>
  • Loading branch information
cielavenir committed Nov 14, 2024
1 parent 9107215 commit 7bfcc24
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7bfcc24

Please sign in to comment.