Merge tag 'drm-misc-fixes-2024-04-18' of https://gitlab.freedesktop.org/drm/misc...
[linux-2.6-block.git] / arch / powerpc / Makefile.postlink
CommitLineData
b2441318 1# SPDX-License-Identifier: GPL-2.0
f188d052
NP
2# ===========================================================================
3# Post-link powerpc pass
4# ===========================================================================
5#
6# 1. Check that vmlinux relocations look sane
7
8PHONY := __archpost
9__archpost:
10
24e0bfbf 11-include include/config/auto.conf
67d7c302 12include $(srctree)/scripts/Kbuild.include
f188d052 13
c494adef
NP
14quiet_cmd_head_check = CHKHEAD $@
15 cmd_head_check = $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/head_check.sh "$(NM)" "$@"
16
f188d052 17quiet_cmd_relocs_check = CHKREL $@
4ea80652
NP
18ifdef CONFIG_PPC_BOOK3S_64
19 cmd_relocs_check = \
43e76cd3 20 $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$(NM)" "$@" ; \
b71dca98 21 $(BASH) $(srctree)/arch/powerpc/tools/unrel_branch_check.sh "$(OBJDUMP)" "$(NM)" "$@"
4ea80652
NP
22else
23 cmd_relocs_check = \
43e76cd3 24 $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$(NM)" "$@"
4ea80652 25endif
f188d052
NP
26
27# `@true` prevents complaint when there is nothing to be done
28
29vmlinux: FORCE
30 @true
c494adef
NP
31ifdef CONFIG_PPC64
32 $(call cmd,head_check)
33endif
f188d052
NP
34ifdef CONFIG_RELOCATABLE
35 $(call if_changed,relocs_check)
36endif
37
f188d052 38clean:
c494adef 39 rm -f .tmp_symbols.txt
f188d052
NP
40
41PHONY += FORCE clean
42
43FORCE:
44
45.PHONY: $(PHONY)