package/devel/perf: fix build for kernel 4.1
[openwrt/staging/mkresin.git] / target / linux / generic / patches-4.1 / 222-perf-build-Do-not-fail-on-missing-Build-file.patch
1 From d7a3d85e08477a979933a2bb3b525a8de99543c2 Mon Sep 17 00:00:00 2001
2 From: Jiri Olsa <jolsa@kernel.org>
3 Date: Fri, 29 May 2015 17:42:58 +0200
4 Subject: [PATCH] perf build: Do not fail on missing Build file
5
6 Allow nesting into directories without Build file. Currently we force
7 include of the Build file, which fails the build when the Build file is
8 missing.
9
10 We already support empty *-in.o' objects if there's nothing in the
11 directory to be compiled, so we can just use it for missing Build file
12 cases.
13
14 Also adding this case under tests.
15
16 Reported-by: Rabin Vincent <rabin.vincent@axis.com>
17 Signed-off-by: Jiri Olsa <jolsa@kernel.org>
18 Cc: David Ahern <dsahern@gmail.com>
19 Cc: Namhyung Kim <namhyung@kernel.org>
20 Cc: Paul Mackerras <paulus@samba.org>
21 Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
22 Cc: Rabin Vincent <rabin.vincent@axis.com>
23 Link: http://lkml.kernel.org/r/1432914178-24086-1-git-send-email-jolsa@kernel.org
24 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
25 ---
26 tools/build/Makefile.build | 2 +-
27 tools/build/tests/ex/Build | 1 +
28 tools/build/tests/ex/empty2/README | 2 ++
29 3 files changed, 4 insertions(+), 1 deletion(-)
30 create mode 100644 tools/build/tests/ex/empty2/README
31
32 diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
33 index 10df572..69c35cf 100644
34 --- a/tools/build/Makefile.build
35 +++ b/tools/build/Makefile.build
36 @@ -37,7 +37,7 @@ subdir-obj-y :=
37
38 # Build definitions
39 build-file := $(dir)/Build
40 -include $(build-file)
41 +-include $(build-file)
42
43 quiet_cmd_flex = FLEX $@
44 quiet_cmd_bison = BISON $@
45 diff --git a/tools/build/tests/ex/Build b/tools/build/tests/ex/Build
46 index 0e6c3e6..70d8762 100644
47 --- a/tools/build/tests/ex/Build
48 +++ b/tools/build/tests/ex/Build
49 @@ -2,6 +2,7 @@ ex-y += ex.o
50 ex-y += a.o
51 ex-y += b.o
52 ex-y += empty/
53 +ex-y += empty2/
54
55 libex-y += c.o
56 libex-y += d.o
57 diff --git a/tools/build/tests/ex/empty2/README b/tools/build/tests/ex/empty2/README
58 new file mode 100644
59 index 0000000..2107cc5
60 --- /dev/null
61 +++ b/tools/build/tests/ex/empty2/README
62 @@ -0,0 +1,2 @@
63 +This directory is left intentionally without Build file
64 +to test proper nesting into Build-less directories.
65 --
66 2.1.4
67