build: replace -lpthread with -pthread

This is the standard way to add multithreading support and handles
platform-specific requirements for pthread library name, #defines, etc.

Also include -pthread in CFLAGS, since it affects preprocessor
definitions.

Change-Id: I94b436c7ef482ae3320b7937f4f64b51e5d57032
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2016-06-22 09:26:54 -07:00
parent 39cc59635a
commit 0faa2948b5

View File

@ -104,7 +104,8 @@ COMMON_CFLAGS += -fsanitize=address
LDFLAGS += -fsanitize=address
endif
LDFLAGS += -lpthread -lrt
COMMON_CFLAGS += -pthread
LDFLAGS += -pthread -lrt
MAKEFLAGS += --no-print-directory