Commit | Line | Data |
---|---|---|
b2441318 | 1 | # SPDX-License-Identifier: GPL-2.0 |
ca0e9bad | 2 | PHONY += posttest |
d65ff75f MH |
3 | |
4 | ifeq ($(KBUILD_VERBOSE),1) | |
80509e27 | 5 | posttest_verbose = -v |
d65ff75f | 6 | else |
80509e27 MH |
7 | posttest_verbose = |
8 | endif | |
9 | ||
10 | ifeq ($(CONFIG_64BIT),y) | |
11 | posttest_64bit = -y | |
12 | else | |
13 | posttest_64bit = -n | |
d65ff75f MH |
14 | endif |
15 | ||
6f5f6726 MH |
16 | distill_awk = $(srctree)/arch/x86/tools/distill.awk |
17 | chkobjdump = $(srctree)/arch/x86/tools/chkobjdump.awk | |
18 | ||
ca0e9bad | 19 | quiet_cmd_posttest = TEST $@ |
6f5f6726 | 20 | 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) |
ca0e9bad | 21 | |
1ec454ba MH |
22 | quiet_cmd_sanitytest = TEST $@ |
23 | cmd_sanitytest = $(obj)/insn_sanity $(posttest_64bit) -m 1000000 | |
24 | ||
25 | posttest: $(obj)/test_get_len vmlinux $(obj)/insn_sanity | |
ca0e9bad | 26 | $(call cmd,posttest) |
1ec454ba | 27 | $(call cmd,sanitytest) |
ca0e9bad | 28 | |
1056c3e9 | 29 | hostprogs-y += test_get_len insn_sanity |
ca0e9bad MH |
30 | |
31 | # -I needed for generated C source and C source which in the kernel tree. | |
584c5ef8 | 32 | 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/ |
ca0e9bad | 33 | |
1ec454ba MH |
34 | HOSTCFLAGS_insn_sanity.o := -Wall -I$(objtree)/arch/x86/lib/ -I$(srctree)/arch/x86/include/ -I$(srctree)/arch/x86/lib/ -I$(srctree)/include/ |
35 | ||
9bf4e7fb | 36 | # Dependencies are also needed. |
ca0e9bad MH |
37 | $(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 |
38 | ||
1ec454ba | 39 | $(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 |
6520fe55 PA |
40 | |
41 | HOST_EXTRACFLAGS += -I$(srctree)/tools/include | |
c889ba80 PA |
42 | hostprogs-y += relocs |
43 | relocs-objs := relocs_32.o relocs_64.o relocs_common.o | |
e6bcd1a8 | 44 | PHONY += relocs |
c889ba80 | 45 | relocs: $(obj)/relocs |
e6bcd1a8 | 46 | @: |