xref: /linux/arch/mips/Makefile.postlink (revision 0ea5c948cb64bab5bc7a5516774eb8536f05aa0d)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
244079d35SMatt Redfearn# ===========================================================================
344079d35SMatt Redfearn# Post-link MIPS pass
444079d35SMatt Redfearn# ===========================================================================
544079d35SMatt Redfearn#
6e4acfbc1SPaul Burton# 1. Check that Loongson3 LL/SC workarounds are applied correctly
7e4acfbc1SPaul Burton# 2. Insert relocations into vmlinux
844079d35SMatt Redfearn
944079d35SMatt RedfearnPHONY := __archpost
1044079d35SMatt Redfearn__archpost:
1144079d35SMatt Redfearn
126e5b95cdSMatt Redfearn-include include/config/auto.conf
13*67d7c302SMasahiro Yamadainclude $(srctree)/scripts/Kbuild.include
1444079d35SMatt Redfearn
15e4acfbc1SPaul BurtonCMD_LS3_LLSC = arch/mips/tools/loongson3-llsc-check
16e4acfbc1SPaul Burtonquiet_cmd_ls3_llsc = LLSCCHK $@
17e4acfbc1SPaul Burton      cmd_ls3_llsc = $(CMD_LS3_LLSC) $@
18e4acfbc1SPaul Burton
1944079d35SMatt RedfearnCMD_RELOCS = arch/mips/boot/tools/relocs
2044079d35SMatt Redfearnquiet_cmd_relocs = RELOCS  $@
2144079d35SMatt Redfearn      cmd_relocs = $(CMD_RELOCS) $@
2244079d35SMatt Redfearn
2344079d35SMatt Redfearn# `@true` prevents complaint when there is nothing to be done
2444079d35SMatt Redfearn
2544079d35SMatt Redfearnvmlinux: FORCE
2644079d35SMatt Redfearn	@true
27e4acfbc1SPaul Burtonifeq ($(CONFIG_CPU_LOONGSON3_WORKAROUNDS),y)
28e4acfbc1SPaul Burton	$(call if_changed,ls3_llsc)
29e4acfbc1SPaul Burtonendif
3044079d35SMatt Redfearnifeq ($(CONFIG_RELOCATABLE),y)
3144079d35SMatt Redfearn	$(call if_changed,relocs)
3244079d35SMatt Redfearnendif
3344079d35SMatt Redfearn
3444079d35SMatt Redfearnclean:
3544079d35SMatt Redfearn	@true
3644079d35SMatt Redfearn
3744079d35SMatt RedfearnPHONY += FORCE clean
3844079d35SMatt Redfearn
3944079d35SMatt RedfearnFORCE:
4044079d35SMatt Redfearn
4144079d35SMatt Redfearn.PHONY: $(PHONY)
42