Skip to contentSkip to conversation

4.9 backport request: perf tools: Fix build with ARCH=x86_64

DISCUSSION Tuomas Tynkkynen 2 participants 2 messages Jan 20, 2018 Stable branch

lore
Share & tools
lore

Tuomas Tynkkynen

author Tested-by Arnaldo Carvalho de Melo Acked-by Jiri Olsa
#0 lore raw

Hi Greg,

Please apply the following commit from 4.10 to 4.9.y to fix perf build under certain conditions:

commit 7a759cd8e8272ee18922838ee711219c7c796a31

Author: Jiada Wang <[email protected]>
Date:   Sun Apr 9 20:02:37 2017 -0700

perf tools: Fix build with ARCH=x86_64

With commit: 0a943cb10ce78 (tools build: Add HOSTARCH Makefile variable) when building for ARCH=x86_64, ARCH=x86_64 is passed to perf instead of ARCH=x86, so the perf build process searchs header files from tools/arch/x86_64/include, which doesn't exist.

The following build failure is seen:

In file included from util/event.c:2:0:
tools/include/uapi/linux/mman.h:4:27: fatal error: uapi/asm/mman.h: No such file or directory compilation terminated.

Fix this issue by using SRCARCH instead of ARCH in perf, just like the main kernel Makefile and tools/objtool's.

Cc Alexander Shishkin <[email protected]>
Cc Andi Kleen <[email protected]>
Cc Eugeniu Rosca <[email protected]>
Cc Jan Stancek <[email protected]>
Cc Masami Hiramatsu <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ravi Bangoria <[email protected]>
Cc Rui Teng <[email protected]>
Cc Sukadev Bhattiprolu <[email protected]>
Cc Wang Nan <[email protected]>
Fixes 0a943cb10ce7 ("tools build: Add HOSTARCH Makefile variable")

Thanks.

maintainer
#1 lore raw
Quoted 25 lines · Tuomas Tynkkynen

Hi Greg,

Please apply the following commit from 4.10 to 4.9.y to fix perf build under certain conditions:

commit 7a759cd8e8272ee18922838ee711219c7c796a31

Author: Jiada Wang <[email protected]>
Date:   Sun Apr 9 20:02:37 2017 -0700

perf tools: Fix build with ARCH=x86_64

With commit: 0a943cb10ce78 (tools build: Add HOSTARCH Makefile variable) when building for ARCH=x86_64, ARCH=x86_64 is passed to perf instead of ARCH=x86, so the perf build process searchs header files from tools/arch/x86_64/include, which doesn't exist.

The following build failure is seen:

In file included from util/event.c:2:0:
tools/include/uapi/linux/mman.h:4:27: fatal error: uapi/asm/mman.h: No such file or directory compilation terminated.

Fix this issue by using SRCARCH instead of ARCH in perf, just like the main kernel Makefile and tools/objtool's.

Quoted 16 lines
Cc Alexander Shishkin <[email protected]>
Cc Andi Kleen <[email protected]>
Cc Eugeniu Rosca <[email protected]>
Cc Jan Stancek <[email protected]>
Cc Masami Hiramatsu <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ravi Bangoria <[email protected]>
Cc Rui Teng <[email protected]>
Cc Sukadev Bhattiprolu <[email protected]>
Cc Wang Nan <[email protected]>
Fixes 0a943cb10ce7 ("tools build: Add HOSTARCH Makefile variable")

Now queued up, thanks.

greg k-h