mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] perf evsel: Fix a build failure on cross compilation
@ 2012-06-21  8:52 Namhyung Kim
  2012-06-29 16:15 ` [tip:perf/core] " tip-bot for Namhyung Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Namhyung Kim @ 2012-06-21  8:52 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, LKML, Namhyung Kim

From: Namhyung Kim <namhyung.kim@lge.com>

The commit c410431cefefd ("perf tools: Reconstruct event
with modifiers from perf_event_attr") added the line, but
it's broken since it needs to go up 3 directories to get
to the kernel root directory, not 2.

However host gcc contains /usr/local/include in its
search path, so that it can find the perf_event.h in
/usr/include. This why we didn't notice the problem yet.
But when I tried to cross compile it appears like:

      CC util/evsel.o
  util/evsel.c:18:44: error: ../../include/linux/perf_event.h: No such file or directory
  make: *** [util/evsel.o] Error 1

Looking at the source, it isn't needed at all as evsel.h
already included the perf_event.h. So simply remove it
would solve the problem.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/util/evsel.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 876f639d69ed..3d1f6968f175 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -15,7 +15,6 @@
 #include "cpumap.h"
 #include "thread_map.h"
 #include "target.h"
-#include "../../include/linux/perf_event.h"
 
 #define FD(e, x, y) (*(int *)xyarray__entry(e->fd, x, y))
 #define GROUP_FD(group_fd, cpu) (*(int *)xyarray__entry(group_fd, cpu, 0))
-- 
1.7.10.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-29 16:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-21  8:52 [PATCH] perf evsel: Fix a build failure on cross compilation Namhyung Kim
2012-06-29 16:15 ` [tip:perf/core] " tip-bot for Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome