2009-08-13 20:34:21 +00:00
|
|
|
PHONY += posttest
|
2009-11-16 23:06:18 +00:00
|
|
|
|
|
|
|
ifeq ($(KBUILD_VERBOSE),1)
|
2009-11-20 17:13:08 +00:00
|
|
|
posttest_verbose = -v
|
2009-11-16 23:06:18 +00:00
|
|
|
else
|
2009-11-20 17:13:08 +00:00
|
|
|
posttest_verbose =
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_64BIT),y)
|
|
|
|
posttest_64bit = -y
|
|
|
|
else
|
|
|
|
posttest_64bit = -n
|
2009-11-16 23:06:18 +00:00
|
|
|
endif
|
|
|
|
|
2009-11-20 17:13:14 +00:00
|
|
|
distill_awk = $(srctree)/arch/x86/tools/distill.awk
|
|
|
|
chkobjdump = $(srctree)/arch/x86/tools/chkobjdump.awk
|
|
|
|
|
2009-08-13 20:34:21 +00:00
|
|
|
quiet_cmd_posttest = TEST $@
|
2009-11-20 17:13:14 +00:00
|
|
|
cmd_posttest = ($(OBJDUMP) -v | $(AWK) -f $(chkobjdump)) || $(OBJDUMP) -d -j .text $(objtree)/vmlinux | $(AWK) -f $(distill_awk) | $(obj)/test_get_len $(posttest_64bit) $(posttest_verbose)
|
2009-08-13 20:34:21 +00:00
|
|
|
|
2011-10-20 14:01:09 +00:00
|
|
|
quiet_cmd_sanitytest = TEST $@
|
|
|
|
cmd_sanitytest = $(obj)/insn_sanity $(posttest_64bit) -m 1000000
|
|
|
|
|
|
|
|
posttest: $(obj)/test_get_len vmlinux $(obj)/insn_sanity
|
2009-08-13 20:34:21 +00:00
|
|
|
$(call cmd,posttest)
|
2011-10-20 14:01:09 +00:00
|
|
|
$(call cmd,sanitytest)
|
2009-08-13 20:34:21 +00:00
|
|
|
|
2011-12-05 12:05:33 +00:00
|
|
|
hostprogs-y += test_get_len insn_sanity
|
2009-08-13 20:34:21 +00:00
|
|
|
|
|
|
|
# -I needed for generated C source and C source which in the kernel tree.
|
2012-10-02 17:01:56 +00:00
|
|
|
HOSTCFLAGS_test_get_len.o := -Wall -I$(objtree)/arch/x86/lib/ -I$(srctree)/arch/x86/include/uapi/ -I$(srctree)/arch/x86/include/ -I$(srctree)/arch/x86/lib/ -I$(srctree)/include/uapi/
|
2009-08-13 20:34:21 +00:00
|
|
|
|
2011-10-20 14:01:09 +00:00
|
|
|
HOSTCFLAGS_insn_sanity.o := -Wall -I$(objtree)/arch/x86/lib/ -I$(srctree)/arch/x86/include/ -I$(srctree)/arch/x86/lib/ -I$(srctree)/include/
|
|
|
|
|
2009-10-21 12:39:51 +00:00
|
|
|
# Dependencies are also needed.
|
2009-08-13 20:34:21 +00:00
|
|
|
$(obj)/test_get_len.o: $(srctree)/arch/x86/lib/insn.c $(srctree)/arch/x86/lib/inat.c $(srctree)/arch/x86/include/asm/inat_types.h $(srctree)/arch/x86/include/asm/inat.h $(srctree)/arch/x86/include/asm/insn.h $(objtree)/arch/x86/lib/inat-tables.c
|
|
|
|
|
2011-10-20 14:01:09 +00:00
|
|
|
$(obj)/insn_sanity.o: $(srctree)/arch/x86/lib/insn.c $(srctree)/arch/x86/lib/inat.c $(srctree)/arch/x86/include/asm/inat_types.h $(srctree)/arch/x86/include/asm/inat.h $(srctree)/arch/x86/include/asm/insn.h $(objtree)/arch/x86/lib/inat-tables.c
|
2012-05-08 18:22:24 +00:00
|
|
|
|
|
|
|
HOST_EXTRACFLAGS += -I$(srctree)/tools/include
|
2013-04-16 23:02:58 +00:00
|
|
|
hostprogs-y += relocs
|
|
|
|
relocs-objs := relocs_32.o relocs_64.o relocs_common.o
|
2014-04-10 01:35:42 +00:00
|
|
|
PHONY += relocs
|
2013-04-16 23:02:58 +00:00
|
|
|
relocs: $(obj)/relocs
|
2014-04-10 01:35:42 +00:00
|
|
|
@:
|