Message ID | 20220820020255.754420-1-warthog9@eaglescrag.net (mailing list archive) |
---|---|
State | Accepted |
Commit | 1bb00d18bacabedca43a08b23cf9ae147d9c9bd2 |
Headers | show |
Series | libtracefs: allow pthread inclusion overrideable in Makefile | expand |
On Fri, 19 Aug 2022 19:02:55 -0700 "John 'Warthog9' Hawley (VMware)" <warthog9@eaglescrag.net> wrote: > 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 > > Signed-off-by: John 'Warthog9' Hawley (VMware) <warthog9@eaglescrag.net> > --- Applied. Thanks John! -- Steve
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
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 Signed-off-by: John 'Warthog9' Hawley (VMware) <warthog9@eaglescrag.net> --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)