xref: /linux/arch/riscv/Makefile.postlink (revision c2dea0bc53397166a77811d9b66928643a83d6f3)
1# SPDX-License-Identifier: GPL-2.0
2# ===========================================================================
3# Post-link riscv pass
4# ===========================================================================
5#
6# Check that vmlinux relocations look sane
7
8PHONY := __archpost
9__archpost:
10
11-include include/config/auto.conf
12include $(srctree)/scripts/Kbuild.include
13
14quiet_cmd_relocs_check = CHKREL  $@
15cmd_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
20vmlinux: FORCE
21	@true
22ifdef CONFIG_RELOCATABLE
23	$(call if_changed,relocs_check)
24endif
25
26%.ko: FORCE
27	@true
28
29clean:
30	@true
31
32PHONY += FORCE clean
33
34FORCE:
35
36.PHONY: $(PHONY)
37