* [PATCH] trace-cmd: Do not have local builds of libtraceevent or libtracefs use system headers
@ 2020-12-16 22:51 Steven Rostedt
0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2020-12-16 22:51 UTC (permalink / raw)
To: Linux Trace Devel
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 --git a/lib/traceevent/Makefile b/lib/traceevent/Makefile
index 0dcd90c1..21ef5a4e 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 021ae2b0..6f4370d9 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
--
2.25.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, back to index
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 22:51 [PATCH] trace-cmd: Do not have local builds of libtraceevent or libtracefs use system headers Steven Rostedt
Linux-Trace-Devel Archive on lore.kernel.org
Archives are clonable:
git clone --mirror https://lore.kernel.org/linux-trace-devel/0 linux-trace-devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 linux-trace-devel linux-trace-devel/ https://lore.kernel.org/linux-trace-devel \
linux-trace-devel@vger.kernel.org
public-inbox-index linux-trace-devel
Example config snippet for mirrors
Newsgroup available over NNTP:
nntp://nntp.lore.kernel.org/org.kernel.vger.linux-trace-devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git