2015-07-17 23:33:40 +07:00
|
|
|
libperf-$(CONFIG_AUXTRACE) += intel-pt-pkt-decoder.o intel-pt-insn-decoder.o intel-pt-log.o intel-pt-decoder.o
|
2015-08-13 14:14:55 +07:00
|
|
|
|
|
|
|
inat_tables_script = util/intel-pt-decoder/gen-insn-attr-x86.awk
|
|
|
|
inat_tables_maps = util/intel-pt-decoder/x86-opcode-map.txt
|
|
|
|
|
|
|
|
$(OUTPUT)util/intel-pt-decoder/inat-tables.c: $(inat_tables_script) $(inat_tables_maps)
|
2015-09-01 12:56:45 +07:00
|
|
|
$(call rule_mkdir)
|
2015-08-13 14:14:55 +07:00
|
|
|
@$(call echo-cmd,gen)$(AWK) -f $(inat_tables_script) $(inat_tables_maps) > $@ || rm -f $@
|
|
|
|
|
2016-07-12 22:16:35 +07:00
|
|
|
# Busybox's diff doesn't have -I, avoid warning in the case
|
|
|
|
|
2015-09-02 19:15:25 +07:00
|
|
|
$(OUTPUT)util/intel-pt-decoder/intel-pt-insn-decoder.o: util/intel-pt-decoder/intel-pt-insn-decoder.c util/intel-pt-decoder/inat.c $(OUTPUT)util/intel-pt-decoder/inat-tables.c
|
2016-07-12 22:16:35 +07:00
|
|
|
@(diff -I 2>&1 | grep -q 'option requires an argument' && \
|
|
|
|
test -d ../../kernel -a -d ../../tools -a -d ../perf && (( \
|
2015-09-02 19:15:25 +07:00
|
|
|
diff -B -I'^#include' util/intel-pt-decoder/insn.c ../../arch/x86/lib/insn.c >/dev/null && \
|
|
|
|
diff -B -I'^#include' util/intel-pt-decoder/inat.c ../../arch/x86/lib/inat.c >/dev/null && \
|
|
|
|
diff -B util/intel-pt-decoder/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt >/dev/null && \
|
|
|
|
diff -B util/intel-pt-decoder/gen-insn-attr-x86.awk ../../arch/x86/tools/gen-insn-attr-x86.awk >/dev/null && \
|
|
|
|
diff -B -I'^#include' util/intel-pt-decoder/insn.h ../../arch/x86/include/asm/insn.h >/dev/null && \
|
|
|
|
diff -B -I'^#include' util/intel-pt-decoder/inat.h ../../arch/x86/include/asm/inat.h >/dev/null && \
|
|
|
|
diff -B -I'^#include' util/intel-pt-decoder/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) \
|
|
|
|
|| echo "Warning: Intel PT: x86 instruction decoder differs from kernel" >&2 )) || true
|
|
|
|
$(call rule_mkdir)
|
|
|
|
$(call if_changed_dep,cc_o_c)
|
2015-08-13 14:14:55 +07:00
|
|
|
|
2017-02-15 02:18:02 +07:00
|
|
|
CFLAGS_intel-pt-insn-decoder.o += -I$(OUTPUT)util/intel-pt-decoder
|
|
|
|
|
2017-08-27 14:54:40 +07:00
|
|
|
ifeq ($(CC_NO_CLANG), 1)
|
2017-02-15 02:18:02 +07:00
|
|
|
CFLAGS_intel-pt-insn-decoder.o += -Wno-override-init
|
|
|
|
endif
|