Linux 4.13.16
[linux/fpc-iii.git] / arch / powerpc / Makefile.postlink
blob5db43ebbe2dfdc9e0197e558bad4917816cc5232
1 # ===========================================================================
2 # Post-link powerpc pass
3 # ===========================================================================
5 # 1. Check that vmlinux relocations look sane
7 PHONY := __archpost
8 __archpost:
10 -include include/config/auto.conf
11 include scripts/Kbuild.include
13 quiet_cmd_head_check = CHKHEAD $@
14       cmd_head_check = $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/head_check.sh "$(NM)" "$@"
16 quiet_cmd_relocs_check = CHKREL  $@
17 ifdef CONFIG_PPC_BOOK3S_64
18       cmd_relocs_check =                                                \
19         $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@" ; \
20         $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/unrel_branch_check.sh "$(OBJDUMP)" "$@"
21 else
22       cmd_relocs_check =                                                \
23         $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@"
24 endif
26 # `@true` prevents complaint when there is nothing to be done
28 vmlinux: FORCE
29         @true
30 ifdef CONFIG_PPC64
31         $(call cmd,head_check)
32 endif
33 ifdef CONFIG_RELOCATABLE
34         $(call if_changed,relocs_check)
35 endif
37 %.ko: FORCE
38         @true
40 clean:
41         rm -f .tmp_symbols.txt
43 PHONY += FORCE clean
45 FORCE:
47 .PHONY: $(PHONY)