aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn 'Warthog9' Hawley (VMware) <warthog9@eaglescrag.net>2022-08-19 19:02:55 -0700
committerSteven Rostedt (Google) <rostedt@goodmis.org>2022-09-08 18:21:21 -0400
commit1bb00d18bacabedca43a08b23cf9ae147d9c9bd2 (patch)
tree801badf64fa17a1a0966e7ffdf209f6d20f46a3b
parent04651d0ebe9d4719e8774c411796d51a83d44680 (diff)
downloadlibtracefs-1bb00d18bacabedca43a08b23cf9ae147d9c9bd2.tar.gz
libtracefs: allow pthread inclusion overrideable in Makefile
clang fails if you attempt to inclued -lpthread in the linking phase for certain versions of clang (newer seems to be happier with it). This should allow for -lpthread to be overridden on the builds where it's causing problems Link: https://lore.kernel.org/linux-trace-devel/20220820020255.754420-1-warthog9@eaglescrag.net Signed-off-by: John 'Warthog9' Hawley (VMware) <warthog9@eaglescrag.net> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index aa659b4..1d25c14 100644
--- a/Makefile
+++ b/Makefile
@@ -132,7 +132,8 @@ LIBTRACEFS_SHARED_VERSION = $(bdir)/libtracefs.so.$(TFS_VERSION)
PKG_CONFIG_SOURCE_FILE = libtracefs.pc
PKG_CONFIG_FILE := $(addprefix $(obj)/,$(PKG_CONFIG_SOURCE_FILE))
-LIBS = $(LIBTRACEEVENT_LIBS) -lpthread
+LPTHREAD ?= -lpthread
+LIBS = $(LIBTRACEEVENT_LIBS) $(LPTHREAD)
export LIBS
export LIBTRACEFS_STATIC LIBTRACEFS_SHARED