[PATCH 03/19] objtool: Avoid checking code drift on busybox's diff

From: Arnaldo Carvalho de Melo
Date: Wed Jul 13 2016 - 22:21:44 EST


From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

That doesn't have -I to match lines.

Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Wang Nan <wangnan0@xxxxxxxxxx>
Link: http://lkml.kernel.org/n/tip-1zqv1h6okt70e2huokkdtf1u@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/objtool/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index f094f3c4ed84..9a3110cac604 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -41,8 +41,11 @@ include $(srctree)/tools/build/Makefile.include
$(OBJTOOL_IN): fixdep FORCE
@$(MAKE) $(build)=objtool

+# Busybox's diff doesn't have -I, avoid warning in that case
+#
$(OBJTOOL): $(LIBSUBCMD) $(OBJTOOL_IN)
- @(test -d ../../kernel -a -d ../../tools -a -d ../objtool && (( \
+ @(diff -I 2>&1 | grep -q 'option requires an argument' && \
+ test -d ../../kernel -a -d ../../tools -a -d ../objtool && (( \
diff -I'^#include' arch/x86/insn/insn.c ../../arch/x86/lib/insn.c >/dev/null && \
diff -I'^#include' arch/x86/insn/inat.c ../../arch/x86/lib/inat.c >/dev/null && \
diff arch/x86/insn/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt >/dev/null && \
--
2.7.4