diff mbox series

[4/6,v2] trace-cmd: Do not have local builds of libtraceevent or libtracefs use system headers

Message ID 20201216232145.613591947@goodmis.org (mailing list archive)
State Accepted
Commit dc15d9e8cd8c82c94830edd339582c7792311763
Headers show
Series trace-cmd/kernelshark: Fixed build, cleanups and fix kernelshark | expand

Commit Message

Steven Rostedt Dec. 16, 2020, 11:19 p.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

If building locally, do not use system includes. This is needed for
kernelshark v1 to build libtraceevent and libtracefs. If the system header
files are used, there may be a mismatch with the frozen version of
libtraceevent or libtracefs that kernelshark will use, and the system
headers, and the build will fail.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 lib/traceevent/Makefile | 4 ++++
 lib/tracefs/Makefile    | 5 +++++
 2 files changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/lib/traceevent/Makefile b/lib/traceevent/Makefile
index 0dcd90c13328..21ef5a4ea59f 100644
--- a/lib/traceevent/Makefile
+++ b/lib/traceevent/Makefile
@@ -6,8 +6,12 @@  bdir:=$(obj)/lib/traceevent
 
 DEFAULT_TARGET = $(bdir)/libtraceevent.a
 
+LIBTRACEEVENT_CFLAGS = -I$(src)/include/traceevent -I$(src)/lib/traceevent/include
+
 CFLAGS += -I$(bdir)/include
 
+CFLAGS := $(LIBTRACEEVENT_CFLAGS) $(CFLAGS)
+
 OBJS =
 OBJS += event-parse.o
 OBJS += event-plugin.o
diff --git a/lib/tracefs/Makefile b/lib/tracefs/Makefile
index 021ae2b040de..6f4370d96f10 100644
--- a/lib/tracefs/Makefile
+++ b/lib/tracefs/Makefile
@@ -6,8 +6,13 @@  bdir:=$(obj)/lib/tracefs
 
 DEFAULT_TARGET = $(bdir)/libtracefs.a
 
+LIBTRACEEVENT_CFLAGS = -I$(src)/include/traceevent -I$(src)/lib/traceevent/include
+LIBTRACEFS_CFLAGS = -I$(src)/include/tracefs -I$(src)/lib/tracefs/include
+
 CFLAGS += -I$(bdir)/include
 
+CFLAGS := $(LIBTRACEEVENT_CFLAGS) $(LIBTRACEFS_CFLAGS) $(CFLAGS)
+
 OBJS =
 OBJS += tracefs-utils.o
 OBJS += tracefs-instance.o