xref: /linux-6.15/arch/powerpc/Makefile.postlink (revision 4ea80652)
1# ===========================================================================
2# Post-link powerpc pass
3# ===========================================================================
4#
5# 1. Check that vmlinux relocations look sane
6
7PHONY := __archpost
8__archpost:
9
10-include include/config/auto.conf
11include scripts/Kbuild.include
12
13quiet_cmd_relocs_check = CHKREL  $@
14ifdef CONFIG_PPC_BOOK3S_64
15      cmd_relocs_check =						\
16	$(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@" ; \
17	$(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/unrel_branch_check.sh "$(OBJDUMP)" "$@"
18else
19      cmd_relocs_check =						\
20	$(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@"
21endif
22
23# `@true` prevents complaint when there is nothing to be done
24
25vmlinux: FORCE
26	@true
27ifdef CONFIG_RELOCATABLE
28	$(call if_changed,relocs_check)
29endif
30
31%.ko: FORCE
32	@true
33
34clean:
35	@true
36
37PHONY += FORCE clean
38
39FORCE:
40
41.PHONY: $(PHONY)
42