From: Emeric Brun Date: Mon, 26 Jun 2017 16:41:42 +0000 (+0200) Subject: MINOR: threads: Prepare makefile to link with pthread X-Git-Tag: v1.8-rc1~170 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5f271850bdc6c3c5c05be0b2ba875f5ea7012f83;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/Makefile b/Makefile index c79e4ae251..aa1a7fee8e 100644 --- a/Makefile +++ b/Makefile @@ -561,6 +561,12 @@ BUILD_OPTIONS += $(call ignore_implicit,USE_DL) OPTIONS_LDFLAGS += -ldl 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 ifneq ($(DLMALLOC_SRC),) BUILD_OPTIONS += DLMALLOC_SRC=$(DLMALLOC_SRC)