MINOR: threads: Prepare makefile to link with pthread

USE_THREAD option has been added to enable the compilation with the experimental
support of threads . Of course for now, there is nothing. And for a while,
HAProxy will be unstable. When we will be confident enough, this option will be
removed.

For this implementation and probably for a while, only the pthread library will
be supported.
This commit is contained in:
Emeric Brun 2017-06-26 18:41:42 +02:00 committed by Willy Tarreau
parent e3a5e35708
commit 5f271850bd

View File

@ -561,6 +561,12 @@ BUILD_OPTIONS += $(call ignore_implicit,USE_DL)
OPTIONS_LDFLAGS += -ldl OPTIONS_LDFLAGS += -ldl
endif endif
ifneq ($(USE_THREAD),)
BUILD_OPTIONS += $(call ignore_implicit,USE_THREAD)
OPTIONS_CFLAGS += -DUSE_THREAD
OPTIONS_LDFLAGS += -lpthread
endif
# report DLMALLOC_SRC only if explicitly specified # report DLMALLOC_SRC only if explicitly specified
ifneq ($(DLMALLOC_SRC),) ifneq ($(DLMALLOC_SRC),)
BUILD_OPTIONS += DLMALLOC_SRC=$(DLMALLOC_SRC) BUILD_OPTIONS += DLMALLOC_SRC=$(DLMALLOC_SRC)