linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Clark Williams <williams@redhat.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Jiri Olsa <jolsa@redhat.com>, Guenter Roeck <linux@roeck-us.net>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Alexey Budankov <alexey.budankov@linux.intel.com>,
	Andi Kleen <ak@linux.intel.com>,
	Michael Petlan <mpetlan@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 17/17] libperf: Fix arch include paths
Date: Tue, 20 Aug 2019 16:27:33 -0300	[thread overview]
Message-ID: <20190820192733.19180-18-acme@kernel.org> (raw)
In-Reply-To: <20190820192733.19180-1-acme@kernel.org>

From: Jiri Olsa <jolsa@redhat.com>

Guenter Roeck reported problem with compilation when the ARCH is
specified:

  $ make ARCH=x86_64
  In file included from tools/include/asm/atomic.h:6:0,
                   from include/linux/atomic.h:5,
                   from tools/include/linux/refcount.h:41,
                   from cpumap.c:4: tools/include/asm/../../arch/x86/include/asm/atomic.h:11:10:
  fatal error: asm/cmpxchg.h: No such file or directory

The problem is that we don't use SRCARCH (the sanitized ARCH version)
and we don't get the proper include path.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: 314350491810 ("libperf: Make libperf.a part of the perf build")
Link: http://lkml.kernel.org/r/20190820124624.GG24105@krava
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/lib/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/lib/Makefile b/tools/perf/lib/Makefile
index 8a9ae50818e4..a67efb8d9d39 100644
--- a/tools/perf/lib/Makefile
+++ b/tools/perf/lib/Makefile
@@ -59,7 +59,7 @@ else
   CFLAGS := -g -Wall
 endif
 
-INCLUDES = -I$(srctree)/tools/perf/lib/include -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(ARCH)/include/ -I$(srctree)/tools/arch/$(ARCH)/include/uapi -I$(srctree)/tools/include/uapi
+INCLUDES = -I$(srctree)/tools/perf/lib/include -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(SRCARCH)/include/ -I$(srctree)/tools/arch/$(SRCARCH)/include/uapi -I$(srctree)/tools/include/uapi
 
 # Append required CFLAGS
 override CFLAGS += $(EXTRA_WARNINGS)
-- 
2.21.0


  parent reply	other threads:[~2019-08-20 19:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-20 19:27 [GIT PULL] perf/core improvements and fixes Arnaldo Carvalho de Melo
2019-08-20 19:27 ` [PATCH 01/17] tools headers: Add limits.h to access __WORDSIZE Arnaldo Carvalho de Melo
2019-08-20 19:27 ` [PATCH 02/17] perf tools: tools/include should come before tools/uapi/include Arnaldo Carvalho de Melo
2019-08-20 19:27 ` [PATCH 03/17] tools headers: Grab copy of linux/const.h, needed by linux/bits.h Arnaldo Carvalho de Melo
2019-08-20 19:27 ` [PATCH 04/17] tools headers: Synchronize linux/bits.h with the kernel sources Arnaldo Carvalho de Melo
2019-08-20 19:27 ` [PATCH 05/17] tools arch x86: Sync asm/cpufeatures.h with the with the kernel Arnaldo Carvalho de Melo
2019-08-20 19:27 ` [PATCH 06/17] perf evsel: Add comment for 'idx' member in 'struct perf_sample_id Arnaldo Carvalho de Melo
2019-08-20 19:27 ` [PATCH 07/17] tools lib traceevent: Fix "robust" test of do_generate_dynamic_list_file Arnaldo Carvalho de Melo
2019-08-20 19:27 ` [PATCH 08/17] perf record: Enable LBR callstack capture jointly with thread stack Arnaldo Carvalho de Melo
2019-08-20 19:27 ` [PATCH 09/17] perf report: Dump LBR callstack data by -D " Arnaldo Carvalho de Melo
2019-08-20 19:27 ` [PATCH 10/17] perf report: Prefer DWARF callstacks to LBR ones when captured both Arnaldo Carvalho de Melo
2019-08-20 19:27 ` [PATCH 11/17] perf cs-etm: Support sample flags 'insn' and 'insnlen' Arnaldo Carvalho de Melo
2019-08-20 19:27 ` [PATCH 12/17] perf ui: Make 'exit_msg' optional in ui__question_window() Arnaldo Carvalho de Melo
2019-08-20 19:27 ` [PATCH 13/17] perf ui: Introduce non-interactive ui__info_window() function Arnaldo Carvalho de Melo
2019-08-20 19:27 ` [PATCH 14/17] perf ui browser: Allow specifying message to show when no samples are available to display Arnaldo Carvalho de Melo
2019-08-20 19:27 ` [PATCH 15/17] perf top: Show info message while collecting samples Arnaldo Carvalho de Melo
2019-08-20 19:27 ` [PATCH 16/17] tools headers: Fixup bitsperlong per arch includes Arnaldo Carvalho de Melo
2019-08-20 19:27 ` Arnaldo Carvalho de Melo [this message]
2019-08-20 19:39 ` [GIT PULL] perf/core improvements and fixes Ingo Molnar
2019-08-20 19:44   ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190820192733.19180-18-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=alexey.budankov@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mingo@kernel.org \
    --cc=mpetlan@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).