diff options
author | Raul E Rangel <rrangel@chromium.org> | 2022-02-25 16:22:27 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2022-02-28 22:00:55 +0000 |
commit | a5ffea9550ed2d95c70e931b9f45a3f7782a7dfd (patch) | |
tree | 0b5fcd76a0368f567b3ff6b59917af73bd527e36 /Makefile.inc | |
parent | dd6efce934fb5ec1d427b79457690cf8889dad92 (diff) |
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>
Diffstat (limited to 'Makefile.inc')
-rw-r--r-- | Makefile.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile.inc b/Makefile.inc index f58418951b..ec2d097b2d 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -791,11 +791,14 @@ endif $(objcbfs)/%.bin: $(objcbfs)/%.raw.bin 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))) @printf " OBJCOPY $(subst $(obj)/,,$(@))\n" cp $< $@.tmp - $(NM_$(class)) -n $@.tmp | sort > $(basename $@).map $(OBJCOPY_$(class)) --strip-debug $@.tmp $(OBJCOPY_$(class)) --add-gnu-debuglink=$< $@.tmp mv $@.tmp $@ |