diff --git a/core/definitions.mk b/core/definitions.mk index 909357ce2b..b6b0d69ed2 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -3422,6 +3422,10 @@ endef # $(2): path in symbols directory # $(3): file type (elf or r8) # $(4): path in the mappings directory +# +# Regarding the restats at the end: I think you should only need to use KATI_RESTAT on $(2), but +# there appears to be a bug in kati where it was not adding restat=true in the ninja file unless we +# also added 4 to KATI_RESTAT. define _copy-symbols-file-with-mapping $(2): .KATI_IMPLICIT_OUTPUTS := $(4) $(2): $(SYMBOLS_MAP) @@ -3430,6 +3434,7 @@ $(2): $(1) $$(copy-file-to-target) $(SYMBOLS_MAP) -$(strip $(3)) $(2) -write_if_changed $(4) .KATI_RESTAT: $(2) +.KATI_RESTAT: $(4) endef