Makefile.postlink 963 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # SPDX-License-Identifier: GPL-2.0
  2. # ===========================================================================
  3. # Post-link MIPS pass
  4. # ===========================================================================
  5. #
  6. # 1. Check that Loongson3 LL/SC workarounds are applied correctly
  7. # 2. Insert relocations into vmlinux
  8. PHONY := __archpost
  9. __archpost:
  10. -include include/config/auto.conf
  11. include scripts/Kbuild.include
  12. CMD_LS3_LLSC = arch/mips/tools/loongson3-llsc-check
  13. quiet_cmd_ls3_llsc = LLSCCHK $@
  14. cmd_ls3_llsc = $(CMD_LS3_LLSC) $@
  15. CMD_RELOCS = arch/mips/boot/tools/relocs
  16. quiet_cmd_relocs = RELOCS $@
  17. cmd_relocs = $(CMD_RELOCS) $@
  18. # `@true` prevents complaint when there is nothing to be done
  19. vmlinux: FORCE
  20. @true
  21. ifeq ($(CONFIG_CPU_LOONGSON3_WORKAROUNDS),y)
  22. $(call if_changed,ls3_llsc)
  23. endif
  24. ifeq ($(CONFIG_RELOCATABLE),y)
  25. $(call if_changed,relocs)
  26. endif
  27. %.ko: FORCE
  28. @true
  29. clean:
  30. @true
  31. PHONY += FORCE clean
  32. FORCE:
  33. .PHONY: $(PHONY)