[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190820124624.GG24105@krava>
Date: Tue, 20 Aug 2019 14:46:24 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Jiri Olsa <jolsa@...nel.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
lkml <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Andi Kleen <ak@...ux.intel.com>,
Alexey Budankov <alexey.budankov@...ux.intel.com>,
Michael Petlan <mpetlan@...hat.com>
Subject: [PATCH] libperf: Fix arch include paths
On Mon, Aug 19, 2019 at 10:21:37AM +0200, Jiri Olsa wrote:
SNIP
> > next-20190816, though the problem has been seen since at least
> > next-20190801. Mainline builds fine.
> >
> > Here is the script I used to bisect the problem:
> >
> > make mrproper
> > rm -rf /tmp/linux
> > mkdir /tmp/linux
> > make ARCH=x86_64 O=/tmp/linux defconfig
> > make -j40 ARCH=x86_64 O=/tmp/linux tools/perf
> >
> > It looks like the problem is related to "ARCH=x86_64". In mainline,
> > x86_64 is replaced in the build command with x86. This is no longer
> > the case, and make now tries to include from tools/arch/x86_64/include/,
> > which doesn't exist. As it turns out, O=<destdir> is not needed to
> > reproduce the problem, only ARCH=x86_64 (or ARCH=i386).
>
> aaargh.. you're right ;-) it's the SRCARCH, which should
> be used in libperf instead of ARCH
>
> change below fixes that for me
attaching the full patch
jirka
---
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@...ck-us.net>
Link: http://lkml.kernel.org/n/tip-408wq8mtajlvs9iir7qo9c84@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
---
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
Powered by blists - more mailing lists