treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / powerpc / Makefile.postlink
blob134f12f89b92b003d5b7f1bdcf1f6349d1b0ee9f
1 # SPDX-License-Identifier: GPL-2.0
2 # ===========================================================================
3 # Post-link powerpc pass
4 # ===========================================================================
6 # 1. Check that vmlinux relocations look sane
8 PHONY := __archpost
9 __archpost:
11 -include include/config/auto.conf
12 include scripts/Kbuild.include
14 quiet_cmd_head_check = CHKHEAD $@
15       cmd_head_check = $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/head_check.sh "$(NM)" "$@"
17 quiet_cmd_relocs_check = CHKREL  $@
18 ifdef CONFIG_PPC_BOOK3S_64
19       cmd_relocs_check =                                                \
20         $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@" ; \
21         $(BASH) $(srctree)/arch/powerpc/tools/unrel_branch_check.sh "$(OBJDUMP)" "$@"
22 else
23       cmd_relocs_check =                                                \
24         $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@"
25 endif
27 # `@true` prevents complaint when there is nothing to be done
29 vmlinux: FORCE
30         @true
31 ifdef CONFIG_PPC64
32         $(call cmd,head_check)
33 endif
34 ifdef CONFIG_RELOCATABLE
35         $(call if_changed,relocs_check)
36 endif
38 %.ko: FORCE
39         @true
41 clean:
42         rm -f .tmp_symbols.txt
44 PHONY += FORCE clean
46 FORCE:
48 .PHONY: $(PHONY)