Makefile: Add a build target for .map
We don't currently have a build target defined for .map files. This means they can't be used as a dependency. This change splits the .map creation into its own rule. BUG=b:221231786 TEST=Build guybrush and verify .map still exists Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I1ce21902e97390aa9520670299ef08debf4458db Reviewed-on: https://review.coreboot.org/c/coreboot/+/62399 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
committed by
Martin Roth
parent
dd6efce934
commit
a5ffea9550
@ -791,11 +791,14 @@ endif
|
|||||||
$(objcbfs)/%.bin: $(objcbfs)/%.raw.bin
|
$(objcbfs)/%.bin: $(objcbfs)/%.raw.bin
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
|
||||||
$(objcbfs)/%.elf: $(objcbfs)/%.debug
|
$(objcbfs)/%.map: $(objcbfs)/%.debug
|
||||||
|
$(eval class := $(call find-class,$(@F)))
|
||||||
|
$(NM_$(class)) -n $< | sort > $(basename $@).map
|
||||||
|
|
||||||
|
$(objcbfs)/%.elf: $(objcbfs)/%.debug $(objcbfs)/%.map
|
||||||
$(eval class := $(call find-class,$(@F)))
|
$(eval class := $(call find-class,$(@F)))
|
||||||
@printf " OBJCOPY $(subst $(obj)/,,$(@))\n"
|
@printf " OBJCOPY $(subst $(obj)/,,$(@))\n"
|
||||||
cp $< $@.tmp
|
cp $< $@.tmp
|
||||||
$(NM_$(class)) -n $@.tmp | sort > $(basename $@).map
|
|
||||||
$(OBJCOPY_$(class)) --strip-debug $@.tmp
|
$(OBJCOPY_$(class)) --strip-debug $@.tmp
|
||||||
$(OBJCOPY_$(class)) --add-gnu-debuglink=$< $@.tmp
|
$(OBJCOPY_$(class)) --add-gnu-debuglink=$< $@.tmp
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
|
Reference in New Issue
Block a user