d5de8d520d3ebf7ca1dae174d006c353196d565b
[platform/kernel/linux-starfive.git] / arch / riscv / Makefile.postlink
1 # SPDX-License-Identifier: GPL-2.0
2 # ===========================================================================
3 # Post-link riscv pass
4 # ===========================================================================
5 #
6 # Check that vmlinux relocations look sane
7
8 PHONY := __archpost
9 __archpost:
10
11 -include include/config/auto.conf
12 include $(srctree)/scripts/Kbuild.include
13
14 quiet_cmd_relocs_check = CHKREL  $@
15 cmd_relocs_check =                                                      \
16         $(CONFIG_SHELL) $(srctree)/arch/riscv/tools/relocs_check.sh "$(OBJDUMP)" "$(NM)" "$@"
17
18 # `@true` prevents complaint when there is nothing to be done
19
20 vmlinux: FORCE
21         @true
22 ifdef CONFIG_RELOCATABLE
23         $(call if_changed,relocs_check)
24 endif
25
26 %.ko: FORCE
27         @true
28
29 clean:
30         @true
31
32 PHONY += FORCE clean
33
34 FORCE:
35
36 .PHONY: $(PHONY)