blob: 83f8e5ba2722c2d1a96930dc55d0db0243d2d638 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Nicholas Pigginf188d052016-11-26 14:26:09 +11002# ===========================================================================
3# Post-link powerpc pass
4# ===========================================================================
5#
6# 1. Check that vmlinux relocations look sane
7
8PHONY := __archpost
9__archpost:
10
Horia Geantă24e0bfb2017-05-08 11:50:16 +030011-include include/config/auto.conf
Nicholas Pigginf188d052016-11-26 14:26:09 +110012include scripts/Kbuild.include
13
Nicholas Pigginc494ade2017-05-12 03:40:39 +100014quiet_cmd_head_check = CHKHEAD $@
15 cmd_head_check = $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/head_check.sh "$(NM)" "$@"
16
Nicholas Pigginf188d052016-11-26 14:26:09 +110017quiet_cmd_relocs_check = CHKREL $@
Nicholas Piggin4ea80652017-05-12 03:40:38 +100018ifdef CONFIG_PPC_BOOK3S_64
19 cmd_relocs_check = \
20 $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@" ; \
21 $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/unrel_branch_check.sh "$(OBJDUMP)" "$@"
22else
23 cmd_relocs_check = \
24 $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@"
25endif
Nicholas Pigginf188d052016-11-26 14:26:09 +110026
27# `@true` prevents complaint when there is nothing to be done
28
29vmlinux: FORCE
30 @true
Nicholas Pigginc494ade2017-05-12 03:40:39 +100031ifdef CONFIG_PPC64
32 $(call cmd,head_check)
33endif
Nicholas Pigginf188d052016-11-26 14:26:09 +110034ifdef CONFIG_RELOCATABLE
35 $(call if_changed,relocs_check)
36endif
37
38%.ko: FORCE
39 @true
40
41clean:
Nicholas Pigginc494ade2017-05-12 03:40:39 +100042 rm -f .tmp_symbols.txt
Nicholas Pigginf188d052016-11-26 14:26:09 +110043
44PHONY += FORCE clean
45
46FORCE:
47
48.PHONY: $(PHONY)