ar71xx: fix legacy image build error
[openwrt/openwrt.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 --- a/tools/build/Makefile.build
33 +++ b/tools/build/Makefile.build
34 @@ -37,7 +37,7 @@ subdir-obj-y :=
35
36 # Build definitions
37 build-file := $(dir)/Build
38 -include $(build-file)
39 +-include $(build-file)
40
41 quiet_cmd_flex = FLEX $@
42 quiet_cmd_bison = BISON $@
43 --- a/tools/build/tests/ex/Build
44 +++ b/tools/build/tests/ex/Build
45 @@ -2,6 +2,7 @@ ex-y += ex.o
46 ex-y += a.o
47 ex-y += b.o
48 ex-y += empty/
49 +ex-y += empty2/
50
51 libex-y += c.o
52 libex-y += d.o
53 --- /dev/null
54 +++ b/tools/build/tests/ex/empty2/README
55 @@ -0,0 +1,2 @@
56 +This directory is left intentionally without Build file
57 +to test proper nesting into Build-less directories.