summaryrefslogtreecommitdiff
path: root/arch/powerpc/Makefile.postlink
blob: 134f12f89b92b003d5b7f1bdcf1f6349d1b0ee9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# SPDX-License-Identifier: GPL-2.0
# ===========================================================================
# Post-link powerpc pass
# ===========================================================================
#
# 1. Check that vmlinux relocations look sane

PHONY := __archpost
__archpost:

-include include/config/auto.conf
include scripts/Kbuild.include

quiet_cmd_head_check = CHKHEAD $@
      cmd_head_check = $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/head_check.sh "$(NM)" "$@"

quiet_cmd_relocs_check = CHKREL  $@
ifdef CONFIG_PPC_BOOK3S_64
      cmd_relocs_check =						\
	$(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@" ; \
	$(BASH) $(srctree)/arch/powerpc/tools/unrel_branch_check.sh "$(OBJDUMP)" "$@"
else
      cmd_relocs_check =						\
	$(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@"
endif

# `@true` prevents complaint when there is nothing to be done

vmlinux: FORCE
	@true
ifdef CONFIG_PPC64
	$(call cmd,head_check)
endif
ifdef CONFIG_RELOCATABLE
	$(call if_changed,relocs_check)
endif

%.ko: FORCE
	@true

clean:
	rm -f .tmp_symbols.txt

PHONY += FORCE clean

FORCE:

.PHONY: $(PHONY)